User:0Michael105/global.js

/* * @name           AnnouncementsIgnore * @author         Noreplyz * @description    Allows users to ignore announcements for certain wikis. */ window.announcementsIgnore = { option: 'opt-out-all', exceptWikiIds: [ 177, // community 4396, // roblox 1668557, // royale-high 1851384 // roblox-case-clicker ] };

/* * @name           AutoCreateUserPages * @version        v1.9 * @author         KockaAdmiralac * @description    Automatically creates a user's userpage, talkpage and message wall greeting *                 with a specified template on wikis where they have at least one contribution. */ window.AutoCreateUserPagesConfig = { content: { 2: ,		3: ,		1202: ''	},	summary: 'Created page' };

/* * @name           NoImageLightbox * @author         Mathmagician * @description    Kills Fandom's Lightbox loader for images and videos. */ window.NoImageLightbox = { novideo: true };

// Import JavaScript importArticles({	type: 'script',	articles: [		'u:dev:MediaWiki:AjaxRC.js', // Advanced auto refreshing for RecentChanges.		'u:dev:MediaWiki:AjaxUndo/code.js', // Adds an Ajax undo link on history pages and diffs.		'u:dev:MediaWiki:AllPagesHideRedirect/code.js', // Adds a link to AllPages and PrefixIndex that hides redirects.		'u:dev:MediaWiki:AnnouncementsIgnore.js', // Ignores announcements for certain wikis.		'u:dev:MediaWiki:AutoCreateUserPages.js', // Automatically creates user pages.		'u:dev:MediaWiki:ContribsLink/code.js', // Adds a link to MyContributions on the user drop-down menu on the top right.		'u:dev:MediaWiki:DedicatedTalkButton.js', // Moves talk page link from drop-down to beside edit button.		'u:dev:MediaWiki:DisableCode/code.js', // Adds buttons to disable personal and site JS/CSS for testing.		'u:dev:MediaWiki:DisableInfoboxBuilder.js', // Prevents InfoboxBuilder from loading by redirecting the template to source editor. 'u:dev:MediaWiki:EditConflictAlert/code.js', // Displays a banner notification when the page in editing is modified. 'u:dev:MediaWiki:MassCategorization/code.js', // Adds a modal to modify categories on multiple pages in a list fashion. 'u:dev:MediaWiki:MassEdit/code.js', // Adds a modal to automatically edit pages, message users, generate lists of member pages belonging to categories/namespaces, and generate pages transcluding templates. 'u:dev:MediaWiki:MarkBlocked.js', // Strikes out blocked usernames to easily identify blocked users. 'u:dev:MediaWiki:MarkForDeletion/code.js', // Adds a button to quickly mark a page for deletion. 'u:dev:MediaWiki:NoImageLightbox/code.js', // Kills Fandom's Lightbox loader for images and videos. 'u:dev:MediaWiki:PortableCSSPad/code.js', // Adds a pad for writing CSS with live-updating. 'u:dev:MediaWiki:PurgeButton/code.js', // Adds a "Purge" option to page controls. 'u:dev:MediaWiki:QuickBarPageTools.js', // Moves FandomDesktop page tool links to the QuickBar. 'u:dev:MediaWiki:Rollback/code.js', // Perform rollbacks without needing the user group. 'u:dev:MediaWiki:SOAPReport.js', // Adds buttons on Contributions for quick reporting users to the SOAP Wiki. 'u:dev:MediaWiki:Sofix.js', // Fixes bugs on Fandom. 'u:dev:MediaWiki:ThemeToggler.js', // Adds two buttons under the edit button to toggle between light and dark theme on FandomDesktop. 'u:dev:MediaWiki:UserAndIPTools.js', // Gets info and tools related to users and IP addresses. 'u:thegoldenpatrik1:MediaWiki:JSEdit.js', // Configurable JS-based editing platform. ] });

// 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', // Adds a modal to delete and protect pages in list form.		'u:dev:MediaWiki:AjaxDelete/code.js', // Adds a modal to delete pages/file revisions without leaving the current page.		'u:dev:MediaWiki:AnchoredRollback/code.js', // Allows for rollbacks without leaving the current page.		'u:dev:MediaWiki:Discussions Delete All/code.js', // Adds a button on Contributions to delete all of the user's Discussions posts.		'u:dev:MediaWiki:MassBlock/code.js', // Adds a modal to block listed users.		'u:dev:MediaWiki:MassProtect/code.js', // Adds a modal to protect listed pages.		'u:dev:MediaWiki:Nuke/code.js', // Mass delete pages from Contributions or RecentChanges.		'u:dev:MediaWiki:WHAM/code.2.js', // Adds "Quick Tools" menu to Contributions for cleanup functions.	] });

// Import JavaScript - threadmoderator elseif(ug.indexOf('threadmoderator') > -2); importArticles({	type: 'script',	articles: [		'u:dev:MediaWiki:Discussions Delete All/code.js', // Adds a button on Contributions to delete all of the user's Discussions posts.	] });

/* * @name           CategorizedNotifications * @author         Joritochip * @description    Separates notifications into five categories *                 based on where they came from for easier navigation. */ importScriptPage('User:Joritochip/common.js', 'joritochip');

/* * @name           DiscussionsTab * @author         Joritochip * @description    Adds back a discussions nav tab for FandomDesktop. */ $(function {	var tool = $('.wiki-tools a[title="Discuss"]');	if(tool.length) {		tool.remove;		$(' Discuss  ').appendTo($('.fandom-community-header__local-navigation .wds-tabs'));	} });

/* * @name           HandleUserpageRedlinks * @author         Joritochip * @description    Prevents userpage redlinks from opening the editor. */ 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); }		}	}); });

/* Remove advertisements and edit section links */ (function {	$("a[data-tracking-label='bingebot.watchlist']")[0].remove;	$(".qual_ol", "#mixed-content-footer", ".mw-editsection").remove; });