Content deleted Content added
No edit summary |
No edit summary |
||
Line 57:
// We can't use mw.loader as it doesn't work both ways (see talk page)
var scriptPath = mw.util.wikiScript('load');
var $
if ($
var uri = new mw.Uri($
if (newState) {
uri.query.modules += ',dark-mode';
Line 65:
if (uri.query.modules === 'ext.gadget.dark-mode') {
// dark-mode is the only module in this element
$
return;
}
Line 72:
.replace(/,dark-mode(,|$)/, '$1'); // dark-mode is in middle or end of the list
}
$
} else {
// No gadget-containing styles are enabled
|