User:0Michael105/global.js

// AnnouncementsIgnore configuration window.announcementsIgnore = { option: 'opt-out-all', exceptWikiIds: [ 177, // community 4396, // roblox 1668557, // royale-high 1851384 // case-clicker-roblox ] };

// AutoCreateUserPages configuration window.AutoCreateUserPagesConfig = { content: { 2: ,       3: ,        1202: ''    },    summary: 'Creating page' };

// DiscussionsActivity configuration window.rdaRefreshInterval = 30000; // Posts will be reloaded every 30 seconds

// FastCreate configuration window.FCButtons = [{ label: 'Create User Page', target: 'User:0Michael105', summary: 'Creating page', content: '', }];

// GlobalNavButtons configuration window.globalNavButtons = [{ text: 'Wikis', url: '', isMain: true, whoIsMain: false, shortName: 'w'   }, {       text: 'Roblox', url: 'https://roblox.fandom.com', isMain: false, whoIsMain: 'w', shortName: 'R'   }, {       text: 'Case Clicker', url: 'https://case-clicker-roblox.fandom.com', isMain: false, whoIsMain: 'w', shortName: 'CCR' },   {        text: 'Royale High', url: 'https://royale-high.fandom.com', isMain: false, whoIsMain: 'w', shortName: 'RH' },   {        text: 'World Expedition', url: 'https://world-expedition.fandom.com', isMain: false, whoIsMain: 'w', shortName: 'WE' },   {        text: 'Community Central', url: 'https://community.fandom.com', isMain: false, whoIsMain: 'w', shortName: 'CC' } ];

// NoImageLightbox configuration window.NoImageLightbox = { novideo: true };

// Import JavaScript importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:AjaxRC.js',        'u:dev:MediaWiki:AjaxUndo/code.js',        'u:dev:MediaWiki:AnnouncementsIgnore.js',        'u:dev:MediaWiki:ArchiveTool/code.js',        'u:dev:MediaWiki:AutoCreateUserPages.js',        'u:dev:MediaWiki:ContribsLink/code.js',        'u:dev:MediaWiki:DedicatedTalkButton.js',        'u:dev:MediaWiki:DisableInfoboxBuilder.js',        'u:dev:MediaWiki:DiscussionsActivity.js', // Awaiting        'u:dev:MediaWiki:FastCreate.js',        'u:dev:MediaWiki:FileLogs.js',        'u:dev:MediaWiki:GlobalNavButtons.js',        'u:dev:MediaWiki:MassCategorization/code.js',        'u:dev:MediaWiki:MassEdit/code.js',        'u:dev:MediaWiki:MarkBlocked.js',        'u:dev:MediaWiki:MarkForDeletion/code.js',        'u:dev:MediaWiki:NoImageLightbox/code.js',        'u:dev:MediaWiki:PurgeButton/code.js',        'u:dev:MediaWiki:Rollback/code.js', 'u:dev:MediaWiki:SOAPReport.js', 'u:dev:MediaWiki:Sofix.js', 'u:dev:MediaWiki:SyntaxHighlight.js', ] });

// Get wgUserGroups var ug = mw.config.get("wgUserGroups").join(' ');

// Import JavaScript - sysop/content-moderator if (ug.indexOf('sysop') + ug.indexOf('content-moderator') > -2) importArticles({       type: 'script',        articles: [            'u:dev:MediaWiki:AjaxBatchDelete.js',            'u:dev:MediaWiki:AjaxDelete/code.js',            'u:dev:MediaWiki:AnalyticsShortcut.js',            'u:dev:MediaWiki:AnchoredRollback/code.js',            'u:dev:MediaWiki:Discussions Delete All/code.js',            'u:dev:MediaWiki:MassBlock/code.js',            'u:dev:MediaWiki:MassProtect/code.js',            'u:dev:MediaWiki:Nuke/code.js',            'u:dev:MediaWiki:WHAM/code.2.js',        ]    });

// Import JavaScript - threadmoderator else if (ug.indexOf('threadmoderator') > -2) importArticles({       type: 'script',        articles: [            'u:dev:MediaWiki:Discussions Delete All/code.js',        ]    });

// Prevent user page redlinks from opening the editor (Joritochip) mw.hook("wikipage.content").add(function($content) {   var links = $('#mw-content-text a.new');    links.each(function(index, element) { if (!$(element).attr('href')) { var title = $(element).attr('title'); if (title.startsWith('User:') && title.endsWith('(page does not exist)')) { title = title.slice(0, -22); var decodedURL = mw.util.getUrl(title); $(element).removeAttr('data-uncrawlable-url'); $(element).attr('href', decodedURL); }       }    }); });

// FandomDesktop theme switch (Pcj) $(function {   if (mw.config.get('skin') !== 'fandomdesktop') return;    var cityId = mw.config.get('wgCityId');    var theme = $('body').hasClass('theme-fandomdesktop-light') ? 'light' : 'dark';

var cssCache = {};

function applyTheme(data, cached) { if (!cached) cssCache[theme] = data; var $s = $('#pcjThemeSwitch')[0] || $(' ').attr('id', 'pcjThemeSwitch').appendTo('body'); $($s).text(data); $('body').removeClass('theme-fandomdesktop-light theme-fandomdesktop-dark').addClass('theme-fandomdesktop-' + theme); }

function switchTheme { theme = theme === 'light' ? 'dark' : 'light'; if (cssCache[theme]) { applyTheme(cssCache[theme], true); } else { $.get(mw.util.wikiScript('wikia') + '?controller=ThemeApi&method=themeVariables&variant=' + theme + '&cityId=' + cityId).done(applyTheme); }   }

$('.tools').append($(' Toggle theme').click(switchTheme)); });