MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 430: Line 430:
         $(this).after('<div class="dark-mode-notif" data-state="'+state+'"></div>');
         $(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(:eq(0))');
         otherNotif.remove();
         otherNotif.remove();
         var notif = $('.dark-mode-notif:last-of-type');
         var notif = $('.dark-mode-notif:eq(0)');
         notif.show();
         notif.show();
         setTimeout(function(){
         setTimeout(function(){