MediaWiki:Gadget-skinTogglesNew.js: Difference between revisions

Jump to navigation Jump to search
not sure if this will work
(Created page with "→‎* * Toggles for skin cookies * * @author Gaz Lloyd * @author JaydenKieran *: ;(function($, mw, rs){ var READER_COOKIE = 'readermode', DARK_COOKIE = 'darkmode', DARK_COOKIE_CONDITIONAL = 'darkmode_conditional', STICKY_HEADER_COOKIE = 'stickyheader', FLOORNUMBER_LS = 'floornumber_display', currentReader = $.cookie(READER_COOKIE) === 'true', currentDark = $.cookie(DARK_COOKIE) === 'true', currentDarkConditional = $.cookie(DARK_COOKIE_CONDITIONAL)...")
 
(not sure if this will work)
Line 314: Line 314:


if (darkc === true) {
if (darkc === true) {
mw.loader.using(['wg.darkmode']).then(function() {
mw.loader.using(['ext.gadget.darkmode']).then(function() {
  $('body').addClass('wgl-darkmode')
  $('body').addClass('wgl-darkmode')
  $('body').removeClass('wgl-lightmode')
  $('body').removeClass('wgl-lightmode')

Navigation menu