ElEditors, Interface administrators, Administrators
70,866
edits
No edit summary |
No edit summary |
||
Line 432: | Line 432: | ||
if ($('body').hasClass('dark-mode')) { | if ($('body').hasClass('dark-mode')) { | ||
setCookie('elwiki-dark-mode', 'true'); | setCookie('elwiki-dark-mode', 'true'); | ||
$(this).after('<div class="dark-mode-notif" data- | $(this).after('<div class="dark-mode-notif" data-state="on"></div>'); | ||
} else { | } else { | ||
setCookie('elwiki-dark-mode', 'true'); | setCookie('elwiki-dark-mode', 'true'); | ||
$(this).after('<div class="dark-mode-notif" data- | $(this).after('<div class="dark-mode-notif" data-state="off"></div>'); | ||
} | |||
setTimeout(function(){ | |||
$('.dark-mode-notif').addClass('toast-visible'); | $('.dark-mode-notif').addClass('toast-visible'); | ||
} | }, 50); | ||
setTimeout(function(){ | setTimeout(function(){ | ||
$('.dark-mode-notif').removeClass('toast-visible'); | $('.dark-mode-notif').removeClass('toast-visible'); | ||
$('.dark-mode-notif').remove(); | setTimeout(function(){ | ||
}, | $('.dark-mode-notif').remove(); | ||
}, 300); | |||
}, 3000); | |||
}); | }); | ||