← Older revision
Revision as of 16:57, March 15, 2013
Line 1:
Line 1:
−
//
+
/* Any JavaScript here will be loaded for all users on every page load. */
−
+
/*jshint smarttabs:true laxcomma:true laxbreak:true jquery:true browser:true*/
−
importScript( 'MediaWiki:Functions.js' );
+
/*global mediaWiki, wgPageName*/
−
+
/*
*/
−
importScriptPage('ShowHide/code.js', 'dev');
+
−
+
/* Discourage/disable the editing of talk page archives */
−
function rewriteTitle()
+
importScriptPage('DisableArchiveEdit/code.js', 'dev');
−
{
+
−
if(typeof(window.SKIP_TITLE_REWRITE) != 'undefined' && window.SKIP_TITLE_REWRITE)
+
importScriptPage('DupImageList/code.js', 'dev');
−
return;
+
−
+
importStylesheet("Template:Ambox/code.css");
−
var titleDiv = document.getElementById('title-meta');
+
−
+
// Warnings
−
if(titleDiv == null)
+
scriptList.push('MediaWiki:Common.js/Warnings.js');
−
return;
+
−
+
/* Include Global Anime-Common.js Information */
−
var cloneNode = titleDiv.cloneNode(true);
+
importScriptURI('http://anime.wikia.com/index.php?title=MediaWiki:Anime-Common.js&action=raw&ctype=text/javascript&dontcountme=s&templates=expand');
−
var firstHeading = getFirstHeading();
+
−
var node = firstHeading.childNodes[0];
+
/* Inactive users get an "inactive" tag on their profile headers */
−
+
InactiveUsers = {months: 2};
−
// new, then old!
+
importScriptPage('InactiveUsers/code.js', 'dev');
−
firstHeading.replaceChild(cloneNode, node);
+
−
cloneNode.style.display = "inline";
+
/* Ability to change full page title */
−
+
importScript('MediaWiki:Common.js/displaytitle.js');
−
var titleAlign = document.getElementById('title-align');
+
−
firstHeading.style.textAlign = titleAlign.childNodes[0].nodeValue;
+
/* Add a tag for "rollback" to profile header when category present */
−
}
+
importScript('MediaWiki:Common.js/rollbacktag.js');
−
+
−
addOnloadHook (rewriteTitle);
+
/* Auto Refresh */
+
AjaxRCRefreshText = 'Auto-refresh';
+
AjaxRCRefreshHoverText = 'Automatically refresh the page';
+
ajaxPages = ["Special:RecentChanges","Special:WikiActivity"];
+
importScriptPage('AjaxRC/code.js', 'dev');
+
+
/* Custom edit buttons */
+
importScript('MediaWiki:Common.js/CEB.js');
+
+
//
+
+
//
+
+
importScriptPage('BackToTopButton/code.js', 'dev');
+
importScriptPage('OasisToolbarButtons/code.js', 'dev');
+
importScriptPage('AutoEditDropdown/code.js', 'dev');
+
+
/* Spoiler Alert */
+
SpoilerAlert = {
+
isSpoiler: function () {
+
return -1 !== wgCategories.indexOf('Spoiler');
+
}
+
};
+
importScriptPage('SpoilerAlert/code.js', 'dev');
+
+
/**Reference Popups
+
*Adapted from wikipedia
+
*For wikia by [[User:UltimateSupreme]]
+
*/
+
mw.loader.load( '//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-ReferenceTooltips.js&action=raw&ctype=text/javascript' );
+
mw.loader.load( '//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-ReferenceTooltips.css&action=raw&ctype=text/css', 'text/css' );
+
mw.util.addCSS( '.referencetooltip > li > sup { display: none; }' );
+
+
// ******************************************************
+
// * SearchGoButton - Version 1.2 *
+
// * *
+
// * Script by Eladkse *
+
// ******************************************************
+
//
+
+
PurgeButtonText = 'Purge';
+
importScriptPage('PurgeButton/code.js', 'dev');
+
importScriptPage('DisplayClock/code.js', 'dev');
+
+
// ****** END: JavaScript for [[Special:Upload]] ******
+
+
define("NS_INFOBOX", 100);
+
define("NS_INFOBOX_TALK", 101);
+
+
$wgExtraNamespaces[NS_INFOBOX] = "Infobox";
+
$wgExtraNamespaces[NS_INFOBOX_TALK] = "Infobox_talk";