ElEditors, Interface administrators, Administrators
70,866
edits
No edit summary |
No edit summary |
||
Line 427: | Line 427: | ||
$('#dark-mode-switch').click(function () { | $('#dark-mode-switch').click(function () { | ||
var | var state = $('body').hasClass('dark-mode') ? 'off' : 'on'; | ||
$(this).after('<div class="dark-mode-notif" data-state="'+ | $(this).after('<div class="dark-mode-notif" data-state="'+state+'"></div>'); | ||
$('body').toggleClass('dark-mode'); | $('body').toggleClass('dark-mode'); | ||
var otherNotif = $('.dark-mode-notif:not(:last-of-type)'); | var otherNotif = $('.dark-mode-notif:not(:last-of-type)'); |