mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-08-03 19:38:36 -04:00
parent
53c8f12ba2
commit
ec38a29836
@ -2233,7 +2233,7 @@ function initializeUISettings () {
|
||||
// similar code also runs in switchCSSTheme(), but that is not evoked on startup
|
||||
if (params.cssTheme == 'auto') document.getElementById('darkInvert').style.display = cssUIThemeGetOrSet('auto', true) == 'light' ? 'none' : 'block';
|
||||
if (params.cssTheme == 'auto') document.getElementById('darkDarkReader').style.display = params.contentInjectionMode === 'serviceworker' ? cssUIThemeGetOrSet('auto', true) == 'light' ? 'none' : 'block' : 'none';
|
||||
document.getElementById('cssUIDarkThemeCheck').addEventListener('change', function () {
|
||||
document.getElementById('cssUIDarkThemeCheck').addEventListener('click', function () {
|
||||
params.cssThemeOriginal = params.cssTheme;
|
||||
// This code implements a tri-state checkbox
|
||||
if (this.readOnly) this.checked = this.readOnly = false;
|
||||
@ -2256,7 +2256,7 @@ document.getElementById('cssUIDarkThemeCheck').addEventListener('change', functi
|
||||
}
|
||||
params.cssThemeOriginal = null;
|
||||
});
|
||||
document.getElementById('cssWikiDarkThemeCheck').addEventListener('change', function () {
|
||||
document.getElementById('cssWikiDarkThemeCheck').addEventListener('click', function () {
|
||||
if (this.readOnly) this.checked = this.readOnly = false;
|
||||
else if (!this.checked) this.readOnly = this.indeterminate = true;
|
||||
// Invert order:
|
||||
|
Loading…
x
Reference in New Issue
Block a user