MediaWiki:Gadget-dark-mode-toggle.js: Difference between revisions
Content deleted Content added
per tper |
As discussed on Discord, the new beta feature dark mode is conflicting with this gadget so for now handle this in the gadget until phab:T365083 Tag: Reverted |
||
Line 122:
// Broadcast state change to other tabs
broadcastChannel.postMessage(isOn);
}
function checkDisableNativeDarkMode() {
const classList = document.documentElement.classList;
if ( classList.contains( 'skin-theme-clientpref-night' ) || classList.contains( 'skin-theme-clientpref-os' ) ) {
classList.remove( 'skin-theme-clientpref-night', 'skin-theme-clientpref-os' );
mw.notify( 'Native dark mode has been enabled. Please set "Color" to light theme to avoid conflicts with the dark mode gadget to supress this message.' );
}
}
Line 135 ⟶ 143:
togglePortlets();
actuallyToggleDarkMode();
checkNativeDarkMode();
}
|