View source for MediaWiki:Gadget-DarkModeToggle.js
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
/**
* Enables or disables the DarkMode gadget.
*
* Authors: User:SD0001, User:Nardog (from Wikipedia / Modified by Vish)
*/
// 'Dark mode' and 'Light mode' messages must match the ::before content in
// [[MediaWiki:Vector.css]] and [[MediaWiki:Gadget-Nightmode.css]], respectively.
// Don't overwrite existing messages, if already set on a foreign wiki prior to loading this file
if (!mw.messages.get('darkmode-turn-on-label')) {
if (mw.config.get('skin') == 'minerva') {
mw.messages.set({
'darkmode-turn-on-label': 'Dark mode',
'darkmode-turn-off-label': 'Light mode',
});
}
else {
mw.messages.set({
'darkmode-turn-on-label': '',
'darkmode-turn-off-label': '',
});
};
000
1:0
Return to MediaWiki:Gadget-DarkModeToggle.js.