mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-09 20:32:45 -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
|
// 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('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';
|
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;
|
params.cssThemeOriginal = params.cssTheme;
|
||||||
// This code implements a tri-state checkbox
|
// This code implements a tri-state checkbox
|
||||||
if (this.readOnly) this.checked = this.readOnly = false;
|
if (this.readOnly) this.checked = this.readOnly = false;
|
||||||
@ -2256,7 +2256,7 @@ document.getElementById('cssUIDarkThemeCheck').addEventListener('change', functi
|
|||||||
}
|
}
|
||||||
params.cssThemeOriginal = null;
|
params.cssThemeOriginal = null;
|
||||||
});
|
});
|
||||||
document.getElementById('cssWikiDarkThemeCheck').addEventListener('change', function () {
|
document.getElementById('cssWikiDarkThemeCheck').addEventListener('click', function () {
|
||||||
if (this.readOnly) this.checked = this.readOnly = false;
|
if (this.readOnly) this.checked = this.readOnly = false;
|
||||||
else if (!this.checked) this.readOnly = this.indeterminate = true;
|
else if (!this.checked) this.readOnly = this.indeterminate = true;
|
||||||
// Invert order:
|
// Invert order:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user