ElEditors, Interface administrators, Administrators
70,857
edits
No edit summary |
No edit summary |
||
Line 428: | Line 428: | ||
$('#dark-mode-switch').click(function () { | $('#dark-mode-switch').click(function () { | ||
$('body').toggleClass('dark-mode'); | $('body').toggleClass('dark-mode'); | ||
$('.dark-mode-notif').remove(); | $('.dark-mode-notif:last').remove(); | ||
matchHeaderText(true); | matchHeaderText(true); | ||
if ($('body').hasClass('dark-mode')) { | if ($('body').hasClass('dark-mode')) { | ||
Line 438: | Line 438: | ||
} | } | ||
setTimeout(function(){ | setTimeout(function(){ | ||
$('.dark-mode-notif').addClass('toast-visible'); | $('.dark-mode-notif:last').addClass('toast-visible'); | ||
}, 50); | }, 50); | ||
setTimeout(function(){ | setTimeout(function(){ | ||
$('.dark-mode-notif').removeClass('toast-visible'); | $('.dark-mode-notif:last').removeClass('toast-visible'); | ||
setTimeout(function(){ | setTimeout(function(){ | ||
$('.dark-mode-notif').remove(); | $('.dark-mode-notif:last').remove(); | ||
}, 300); | }, 300); | ||
}, 3000); | }, 3000); |