MediaWiki:Common.js

// // Last Modified: 17th April 2021, 18:05 // This is the wiki-wide javascript file. // Anything below will be loaded on all wiki-styles. // // Please make sure any code snippets below adhere to // the Wikia Customisation policy. // // Do NOT edit this file if you do not know what you are doing! //

// jQuery code snippets. // Use this for any minor fixes with jquery. (function (window, $, mw) {	"use strict";	// Custom edit buttons	if (mw.toolbar) {		mw.toolbar.addButton( 'https://images.wikia.nocookie.net/central/images/c/c8/Button_redirect.png', 'Redirect', '#REDIRECT ',			'', 'Insert text', 'mw-editbutton-redirect' ); 		mw.toolbar.addButton( 'https://images.wikia.nocookie.net/__cb20100821183407/bleach/en/images/e/e1/O_Accent_Button.png', 'Add the ō character', 'ō', ,			,			'mw-editbutton-macron-o' ); 		mw.toolbar.addButton( 'https://images.wikia.nocookie.net/__cb20100821183407/bleach/en/images/d/db/U_Accent_Button.png', 'Add the ū character', 'ū', ,			,			'mw-editbutton-macron-u' ); 		mw.toolbar.addButton( 'https://images.wikia.nocookie.net/naruto/images/7/79/Button_reflink.png', 'Add a Chapter Reference', ' ',			'Chapter 0, page 0', 'mw-editbutton-ref' );	}

// Append a notice after infobox to help users find the main article. if(mw.config.get("wgNamespaceNumber") === 112) { var name = wgPageName.slice(8); var title = name.replace(/_/g," "); $("div#mw-content-text > table.mobile-ibox").after(` Return to ${title} `); }

// Add custom class for styling long list of refs if ($('.references li').length > 9) { $('.references').addClass('compactreferences'); } }(window, jQuery, mediaWiki));

// This code snippet is for all sysop-only tools. // Anything here will only load if the user has // the sysop flag. if (jQuery.inArray("sysop", wgUserGroups) !=-1) { mw.util.addPortletLink("AccountNavigation", "/wiki/Special:AdminDashboard", "Dashboard", "p-dashboard"); mw.util.addPortletLink("AccountNavigation", "/wiki/Special:UserRights", "Manage Rights", "p-userrights"); importArticles({		type: "script",		articles: [			"u:dev:MediaWiki:AjaxBatchDelete/code.js",			"u:dev:MediaWiki:CacheCheck/code.js"		]	}); }

// AjaxRC window.ajaxSpecialPages = ["Log", "RecentChanges"]; window.ajaxIndicator = 'https://images.wikia.nocookie.net/__cb20100609110347/software/images/a/a9/Indicator.gif'; window.AjaxRCRefreshText = 'Auto Refresh'; window.AjaxRCRefreshHoverText = 'Silently refreshes the contents of this page every 60 seconds without requiring a full reload';

// ArchiveTool window.archiveListTemplate = 'ArchiveList'; window.archivePageTemplate = 'ArchivePage';

// MessageWallUserTags window.MessageWallUserTags = { tagColor: 'red', glow: false, users: { "GouenjiShuuya'123" : "Founder • Bureaucrat", "SuperSajuuk"      : "Admin • Coder", "Sarutobii2"       : "Admin", "Damage3245"       : "Admin" } };

// This imports various scripts that help the wiki. // Non-local scripts load first for interoperability. importArticles({	type: "script",	articles: [		"u:dev:MediaWiki:DiscussionsFeed.js",		"u:dev:MediaWiki:WhatLinksHere/code.js",		"u:dev:MediaWiki:WikiActivity.js",		"u:dev:MediaWiki:ListFiles/code.js",		"u:dev:MediaWiki:ArchiveTool/code.js",		"u:dev:MediaWiki:DiscordIntegrator/code.js",		"u:dev:MediaWiki:NullEditButton/code.js",		"u:dev:MediaWiki:MessageWallUserTags/code.js",		"u:dev:MediaWiki:ReferencePopups/code.js",		"u:dev:MediaWiki:AnchoredRollback/code.js",		"u:dev:MediaWiki:FileUsageAuto-update/code.js",		"u:dev:MediaWiki:MassCategorization/code.js",		"u:dev:MediaWiki:MassEdit/code.js",		"u:dev:MediaWiki:MassRename/code.js",		"u:dev:MediaWiki:AjaxRC/code.js",		"u:naruto:MediaWiki:Gadget-AcountNav.js",		"MediaWiki:Common.js/FixUploader.js"	] });