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');

/* Recent Changes Auto Refresh */ 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 === "monaco" ) {    var $siteNotice = $('#siteNotice');    $siteNotice.find('script').remove;    $siteNotice.insertBefore('#article');    $siteNotice.find('table table').appendTo($siteNotice);    $siteNotice.find('#mw-dismissable-notice').remove;  } else 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; } if( ( wgAction === "edit" && wgNamespaceNumber > -1 && wgNamespaceNumber % 2 === 0 ) || wgPageName === "Special:CreatePage" ) $(" Do not add new manga information to the wiki until the entire chapter is available. ") .prependTo(skin === "oasis" || skin === "wikia" ? '#WikiaArticle' : '#bodyContent'); if( wgAction === "edit" && wgNamespaceNumber === 8 && wgTitle === "Monaco-sidebar" ) { $("#bodyContent #wikiPreview ul li").each(function {     var n = this;      var texts = this.firstChild.nodeValue.replace(/^\s+/, "").replace(/\s+$/, "").split("|");      n.removeChild(n.firstChild);      var before = n.firstChild; texts.forEach(function(text, i) { if ( i ) n.insertBefore(document.createTextNode("|"), before); if ( /[#:]/.test(text) ) n.insertBefore(document.createTextNode(text), before); else n.insertBefore($("").attr({href: wgArticlePath.replace("$1", "MediaWiki:"+text.replace(/^\s+/, ""))}).text(text)[0], before); });   });  } });

/* Custom Edit buttons - http://en.wikipedia.org/wiki/User:MarkS/Extra_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; }' ); /* */