diff options
author | Doge <[email protected]> | 2021-05-10 00:28:12 +0800 |
---|---|---|
committer | Doge <[email protected]> | 2021-05-10 00:28:12 +0800 |
commit | 37af3922761fd0c982ba2ffec11bfa1850269702 (patch) | |
tree | 83e019ed749eb610833854c2c5accc95677db61e /source | |
parent | b481a882fdfb55783618af0c1380faba959f6f11 (diff) | |
download | chromate-37af3922761fd0c982ba2ffec11bfa1850269702.tar.gz chromate-37af3922761fd0c982ba2ffec11bfa1850269702.tar.bz2 chromate-37af3922761fd0c982ba2ffec11bfa1850269702.zip |
Enhance autodark working
Diffstat (limited to 'source')
-rw-r--r-- | source/js/script.js | 4 | ||||
-rw-r--r-- | source/js/script.ts | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/source/js/script.js b/source/js/script.js index 21eda5d..ae91858 100644 --- a/source/js/script.js +++ b/source/js/script.js @@ -17,9 +17,7 @@ window.addEventListener("load", function () { } // Add header hover page class changer var colorman = function (mode) { - var clsname = ".is-light"; - if (darklistener.mode() === SystemDarkmodePrefrence.dark) - clsname = ".is-dark"; + var clsname = ".auto-dark"; var elements = Array.prototype.slice.call(document.querySelectorAll(clsname), 0); elements.forEach(function (element) { if (mode === SystemDarkmodePrefrence.dark) { diff --git a/source/js/script.ts b/source/js/script.ts index 7bfdda5..e6a2155 100644 --- a/source/js/script.ts +++ b/source/js/script.ts @@ -18,9 +18,7 @@ window.addEventListener("load", () => { // Add header hover page class changer const colorman = (mode: SystemDarkmodePrefrence) => { - let clsname: string = ".is-light"; - if (darklistener.mode() === SystemDarkmodePrefrence.dark) - clsname = ".is-dark"; + let clsname: string = ".auto-dark"; const elements: Element[] = Array.prototype.slice.call( document.querySelectorAll(clsname), 0); elements.forEach((element) => { |