Added fake dark

This commit is contained in:
M66B
2022-07-04 08:11:26 +02:00
parent 7d2f1f3cc8
commit 92e8732d6c
6 changed files with 74 additions and 28 deletions

View File

@@ -2372,6 +2372,14 @@ public class HtmlHelper {
document.select("head").append(sb.toString());
}
static void fakeDark(Document document) {
// https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/invert
// https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/hue-rotate
document.head().appendElement("style").html(
"body { filter: invert(100%) hue-rotate(180deg) !important; background: black !important; }" +
"img { filter: invert(100%) hue-rotate(180deg) !important; }");
}
static String getLanguage(Context context, String subject, String text) {
try {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);