MediaWiki:Common.js

/* */

/* Include Global Anime-Common.js Information */ importScriptURI('http://anime.wikia.com/index.php?title=MediaWiki:Anime-Common.js&action=raw&ctype=text/javascript&dontcountme=s&smaxage=86400&templates=expand');

// Remove red-links (deleted pages) from Recent Changes // They stay red, they just don't link to ?action=edit

if (({Recentchanges: 1, Log: 1})[mw.config.get('wgCanonicalSpecialPageName')] === 1) { var deNewRC = function { $('a.new').each(function {				this.href = this.href.replace(/\?[^?]*$/, '');			}); };		$(deNewRC); }

ajaxCallAgain = [deNewRC]; ajaxPages = ["Special:RecentChanges", "Special:Watchlist", "Special:Log", "Special:Contributions", "Special:NewFiles", "Special:NewPages", "Special:ListFiles", "Special:WikiActivity"]; importScriptPage('AjaxRC/code.js', 'dev');

importScriptPage('DupImageList/code.js','dev');

importScriptPage('ListFiles/code.js','dev');

importScriptPage('MediaWiki:Common.js/FixMultipleUpload.js','naruto');

importScriptPage('MediaWiki:Common.js/SigReminder.js','naruto');

importScriptPage('PurgeButton/code.js','dev');

importScriptPage('MediaWiki:Common.js/FairUseUpload.js', 'naruto');

// ArchiveTool var archiveListTemplate = 'ArchiveList'; var archivePageTemplate = 'ArchivePage'; importScriptPage('ArchiveTool/code.js', 'dev');

$(function {  if ( skin === "oasis" || skin === "wikia" ) {    if ( wgNamespaceNumber > 0 && wgNamespaceNumber % 2 == 1 && /^.+\/Archive \d+$/.test( wgTitle ) ) {      // Archive pages are not meant to be edited so lower the priority of the edit button.      var $edit = $('#WikiaPageHeader .wikia-menu-button a:first');      $edit.find('img').remove;      $('').append( $edit )        .appendTo( $('#WikiaPageHeader .wikia-menu-button .WikiaMenuElement') );      $('Archive Page')        .prependTo( '#WikiaPageHeader .wikia-menu-button' )        .click( function { $( this ).parent.find('> .drop').click; } );      $('#WikiaPageHeader .wikia-menu-button .WikiaMenuElement #ca-edit').css({ color: '#999', fontStyle: 'italic' }).attr({ title: "This page is an archive and should not be edited." });     if ( wgAction === "edit" ) {        var $n = $( 'This is an archive, it is NOT a talkpage. Please refrain from editing it without a good reason.' );       $( '#EditPageEditor .editpage-notices ul').empty.append( $n );      }    }  } else {    $('#mw-dismissable-notice > tbody > tr > td:last').remove;  } }); /*Spoiler warning*/

// For normal edit pages if (mediaWiki.config.get('wgAction') === 'edit' && mediaWiki.config.get('wgNamespaceNumber') === 0) { mediaWiki.loader.using('mediawiki.util', function {   if (!mediaWiki.util.getParamValue('editintro')) {        window.location.href += '&editintro=Template:EditPageNotice';    } }); }

//For forms if (mediaWiki.config.get('wgAction') === 'formedit') { mediaWiki.loader.using('mediawiki.api', function {   new mediaWiki.Api.get({ action: 'parse', page: 'Template:EditPageNotice', prop: 'text' }, {       ok: function(json) { $('#mw-content-text').prepend(json.parse.text['*']); }   }); }); } /* Custom Edit buttons - http://naruto.wikia.com/wiki/Help:Custom_edit_buttons */ if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images4.wikia.nocookie.net/__cb20100821183407/bleach/en/images/d/db/U_Accent_Button.png", "speedTip": "Add the ū character", "tagOpen": "ū", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/__cb20100821183407/bleach/en/images/e/e1/O_Accent_Button.png", "speedTip": "Add the ō character", "tagOpen": "ō", "tagClose": "", "sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/naruto/images/7/79/Button_reflink.png", "speedTip": "Add a Chapter Reference", "tagOpen": " ", "sampleText": "Naruto chapter 0, page 0"}; }

/**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; }' );

// Automatically uncheck "Leave a redirect behind" on files if (wgPageName.indexOf("Special:MovePage/File:") != -1) { $('input[name=wpLeaveRedirect]').attr('checked', false); }

/* */