MediaWiki:Common.js

// // Last Modified: 8th January 2015, 23:10 // 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";	// Fix images on threads (image line breaks and looks messy)	$(".msg-body img").unwrap;       // Custom edit buttons	if (mw.toolbar) {		mw.toolbar.addButton( 'http://images.wikia.com/central/images/c/c8/Button_redirect.png', 'Redirect', '#REDIRECT ',			'', 'Insert text', 'mw-editbutton-redirect' ); 		mw.toolbar.addButton( 'http://images2.wikia.nocookie.net/__cb20100821183407/bleach/en/images/e/e1/O_Accent_Button.png', 'Add the ō character', 'ō', ,			,			'mw-editbutton-macron-o' ); 		mw.toolbar.addButton( 'http://images4.wikia.nocookie.net/__cb20100821183407/bleach/en/images/d/db/U_Accent_Button.png', 'Add the ū character', 'ū', ,			,			'mw-editbutton-macron-u' ); 		mw.toolbar.addButton( 'http://images1.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+" "); } }(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"); importScriptPage('AjaxBatchDelete/code.js', 'dev'); importScriptPage('CacheCheck/code.js', 'dev'); }

// Load forum changes only in the forum namespace. if (({1201: 1, 2000: 1})[mw.config.get('wgNamespaceNumber')] === 1 || mw.config.get('wgCanonicalSpecialPageName') === 'Forum') { importScriptPage("MediaWiki:Common.js/Forum.js"); }

// AjaxRC window.ajaxPages = ["Special:WikiActivity","Special:Log","Special:RecentChanges"]; window.ajaxIndicator = 'http://images2.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';

// RevealAnonIP window.RevealAnonIP = { permissions : ['user'] };

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

// MessageWallUserTags window.MessageWallUserTags = { tagColor: 'red', glow: false, users: { "SuperSajuuk"      : "Bureaucrat • Coder", "Grimmjay"         : "Bureaucrat • Founder", "GouenjiShuuya'123" : "Sysop" } }; // This imports various scripts that help the wiki. // Non-local scripts load first for interoperability. importArticles({	type: "script",	articles: [		"u:dev:ListFiles/code.js",		"u:dev:ArchiveTool/code.js",		"u:dev:RevealAnonIP/code.js",		"u:dev:NullEditButton/code.js",               "u:dev:MessageWallUserTags/code.js",		"u:dev:ReferencePopups/code.js",		"u:dev:User:UltimateSupreme/AjaxRollback.js",		"u:dev:AjaxRC/code.js",		"u:naruto:MediaWiki:Gadget-AcountNav.js",		"MediaWiki:Common.js/FixUploader.js"	] });