summaryrefslogtreecommitdiff
path: root/js/app.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2020-04-21 14:04:37 +0300
committerAndrew Dolgov <[email protected]>2020-04-21 14:04:37 +0300
commit7c8692a40c6cdbcb704fa0bc9db2b99a5d314b73 (patch)
tree64260a710d3f78a2b63b6c479f342f2d4ca92f80 /js/app.js
parent09942cf787798d82bfdacc9df533352a1970d337 (diff)
support for app-provided limited night mode in index
Diffstat (limited to 'js/app.js')
-rw-r--r--js/app.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/js/app.js b/js/app.js
index c9cd536..5c55fb3 100644
--- a/js/app.js
+++ b/js/app.js
@@ -214,6 +214,13 @@ const App = {
}
},
initNightMode: function() {
+ if (typeof EpubeApp != "undefined") {
+ if (!EpubeApp.isAutoNightModeSupported()) {
+ App.applyNightMode(EpubeApp.isNightMode());
+ return;
+ }
+ }
+
if (window.matchMedia) {
const mql = window.matchMedia('(prefers-color-scheme: dark)');