MediaWiki:Gadget-Night-Mode.js

/* * Discontinued Features Wiki Night Mode gadget. * * Design Team: * Original author: * - Left-Eye. - User:Left-Eye - 2021-Present. * * Original authors of dark mode stuff this gadget was inspired by and based apon: * - Volker E. - [ 'https://en.wikipedia.org/wiki/User:Volker_E._(WMF)/dark-mode.css' ] * - MusikAnimal - [ 'https://www.mediawiki.org/wiki/Extension:DarkMode' ] * * Last updated: 09-20-2021 */

/* - When this gadget is enabled all it does is add the html class "client-night-mode". - Is enabled and disabled depending on the setting of the "Night Mode, Day Mode" toggle in the personal links. - Only works for logged in users. - Is meant to be used in conjunction with the wiki's custom skin and does nothing for all other skins. */ $(function(e) {	var $html = $('html');	$html.toggleClass('client-night-mode');			mw.storage.set( 'client-night-mode-toggle', String(Number($html.hasClass('client-night-mode'))) ); });