User:GettingMemoriesPerson/global.js

if (mw.config.get('skin') === 'fandomdesktop') { var themeSheet1 = document.createElement('link'), themeURL1 = '/wikia.php?controller=ThemeApi&method=themeVariables&variant=', themeSheet2 = document.createElement('link'), themeURL2 = '/load.php?fandomdesktop=1&lang=en&modules=' + 'ext.fandom.DesignSystem.GlobalNavigation.brand.$1.css%7C' + 'ext.fandom.DesignSystem.brand.$1.css' + '&only=styles&skin=fandomdesktop'; switch (mw.config.get('wgServerName')) { // Wikis to switch to dark mode case 'lost-cities-keeper.fandom.com': case 'dystopian-fiction.fandom.com': case 'math.wikia.org': themeSheet1.rel = "stylesheet"; themeSheet1.href = themeURL1 + 'dark'; document.head.appendChild(themeSheet1);

themeSheet2.rel = "stylesheet"; themeSheet2.href = themeURL2.replace(/\$1/g, 'dark'); document.head.appendChild(themeSheet2);

document.body.classList.remove('theme-fandomdesktop-light'); document.body.classList.add('theme-fandomdesktop-dark'); mw.config.set('isDarkTheme', true); break;

// Wikis to switch to light mode case 'towerheroes.fandom.com': case 'community.fandom.com': themeSheet1.rel = "stylesheet"; themeSheet1.href = themeURL1 + 'light'; document.head.appendChild(themeSheet1);

themeSheet2.rel = "stylesheet"; themeSheet2.href = themeURL2.replace(/\$1/g, 'light'); document.head.appendChild(themeSheet2);

document.body.classList.remove('theme-fandomdesktop-dark'); document.body.classList.add('theme-fandomdesktop-light'); mw.config.set('isDarkTheme', false); break; } }

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:UCXSearchBar.js',    ] });

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:CodeQuickLinks/code.js',    ] });

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:ThemeToggler.js',    ] });

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:MobilePreview.js',    ] });

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:QuickBarPageTools.js',    ] }); importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:CollapseGlobalNavButton.js',    ] });