User:Meeples10/common.js

mw.loader.localLoad = function (url) { return mw.loader.load('http://www.minecraftwiki.net/index.php?title=' + url + '&action=raw&ctype=text/javascript'); };

/* Counts all your edits and saves them to a page ( http://www.minecraftwiki.net/wiki/User:Meeples10/editcounter ) */ if (mw.config.get('wgTitle') === mw.config.get('wgUserName') && mw.config.get('wgNamespaceNumber') === 2) { var subPages = 'true'; var nameSpaces = new Array; nameSpaces[3] = 'Utalk'; nameSpaces[4] = 'MCW'; nameSpaces[5] = 'MCWtalk'; nameSpaces[7] = 'Ftalk'; nameSpaces[8] = 'MW'; nameSpaces[9] = 'MWtalk'; nameSpaces[10] = 'Temp'; nameSpaces[11] = 'Ttalk'; nameSpaces[13] = 'Htalk'; nameSpaces[14] = 'Cat'; nameSpaces[15] = 'Ctalk'; var mainTableAttrib = 'class="wikitable" style="font-family: Minecraft; margin: 0 auto 1em; text-align: center"'; var noInclude = ''; mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Kanegasi/editcounter.js&action=raw&ctype=text/javascript'); }

/* Creates a dropdown menu on edit summaries with presets */ if (mw.config.get('wgAction') === 'edit' || mw.config.get('wgAction') === 'submit') { var customSummaries = [ '[' + '[Project:Wiki Rules#2|Rule#2]]: Spam', '[' + '[Project:Wiki Rules#2|Rule#2]]: Vandalism', '[' + '[Project:Wiki Rules#8|Rule#8]]: Belongs in [' + '[Tutorials]]', '[' + '[Project:Wiki Rules#10|Rule#10/11]]: Server/community advertising', '[' + '[Project:Wiki Rules#15|Rule#15.1]]: Mod info in vanilla article', '' + 'That is a bad idea.', '' + 'That belongs on a talk page.', '' + 'That does not make sense.', '' + 'What does that even mean?', '' + 'Rudeness', ];   mw.loader.localLoad('User:Kanegasi/editsummarypresets.js'); }

/* Wikipedia's HotCat gadget ( http://en.wikipedia.org/wiki/Wikipedia:HotCat ) */ if (mw.config.get('wgNamespaceNumber') >= 0) { mw.loader.localLoad('User:Kanegasi/HotCat.js'); }

/* Recent Changes auto-refresh */ mw.loader.load('http://www.wowpedia.org/index.php?title=User:Pcj/ajaxrc.js&action=raw&ctype=text/javascript');

/* Allows rollback summary to be edited */ mw.loader.localLoad('User:Ultradude25/editableRollback.js');

$(function { 'use strict';

/* Adds a history link to the new messages box - Original script: wikipedia:User:Davidgothberg/newmessageshistory.js */ $('#mw-youhavenewmessages a:last').after(', history');

/* Changes vector menu items into tabs */ $('#p-cactions').addClass('emptyPortlet').find('> .menu li').addClass('collapsible').find('a').wrap(' '); $('#p-views > ul').append($('#p-cactions > .menu li'));

/* Replaces ugly links with fancy ones ("/wiki/Pagename?action=edit" instead of "/index.php?title=Pagename&action=edit") */ $('a').prop('href', function {   return this.href.replace(/\/index\.php\?title=([\w:/=!\-.\(\)]*)&(?!action=(?:un)?watch)([\w:/=]*)/, "/wiki/$1?$2"); } );

} );