1,131
edits
No edit summary |
No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 7: | Line 7: | ||
var self = { | var self = { | ||
init: function() { | init: function() { | ||
if (currentDark) { | |||
$('body').addClass('wgl-darkmode') | |||
$('body').removeClass('wgl-lightmode') | |||
} | |||
portletLink = mw.util.addPortletLink( | portletLink = mw.util.addPortletLink( | ||
'p-personal', | 'p-personal', | ||
| Line 20: | Line 26: | ||
e.preventDefault(); | e.preventDefault(); | ||
currentDark = !currentDark; | |||
localStorage.setItem(DARKMODE_COOKIE, currentDark); | localStorage.setItem(DARKMODE_COOKIE, currentDark); | ||