User:Kanegasi/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://en.wikipedia.org/wiki/User:Kanegasi/editcounter ) */ if (mw.config.get( 'wgTitle' ) === mw.config.get( 'wgUserName' ) && mw.config.get( 'wgNamespaceNumber' ) === 2) { var pageName = 'edit count'; var summaryLink = 'wikipedia:User:Kanegasi/editcounter'; var transcludeAll = false; var tableHeaders = true; var bottomRowAttrib = 'style="font-size: large"'; mw.loader.load( 'https://en.wikipedia.org/w/index.php?title=User:Kanegasi/editcounter.js&action=raw&ctype=text/javascript' ); }

/* Replaces IPs with their known owner, publicly acknowledged by that user */ $('.mw-userlink[title*="82.69.54.207"]').text( 'Simons Mith' );

/* Creates a dropdown menu on edit summaries with presets */ if (mw.config.get( 'wgAction' ) === 'edit' || mw.config.get( 'wgAction' ) === 'submit') { var customSummaries = [ 'already mentioned', ,       ,        'comment', 'curse video', 'general layout', 'grammar/spelling', '' + 'go to the forums', 'Mojang license', 'needs citation', 'not an article', 'pointless', 'unexplained removal of content', 'reply', 'section header', 'Interwiki link', 'subjective', 'sync', 'that\'s nice', 'unnecessary', 'we don\'t document the community in articles', 'what?', 'Rule#1: Violates ToU/brand guidelines', 'Rule#2: Spam', 'Rule#2: Vandalism', 'Rule#3: Too simple/outside wiki\'s scope', 'Rule#3.1: No proof Moj' + 'ang has played this', 'Rule#4: Lack of content', 'Rule#5: Harassment/insult/' + 'ad hominem', 'Rule#6: Not a Moj' + 'angster', 'Rule#7/7.1: False info/speculation', 'Rule#8: Belongs in Tutor' + 'ials', 'Rule#9: Custom server mods belong with their server article', 'Rule#10/11: Server/community advertising', 'Rule#13: ' + 'Plagiarism', 'Rule#15.1: Mod info in vanilla article', 'Rule#16: Video policy', 'Rule#18: Signature', 'Rule#19: Herospam', 'Rule#20: Custom textures/UI/mods', 'Rule#22: Template as signature', 'Rule#23: Not tutorial material', ];   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' ); }

/* Adds JavaScript and CSS syntax highlighting - Original script: */ mw.loader.localLoad( 'User:Ultradude25/syntaxHighlight.js' ); mw.loader.localLoad( 'User:Ultradude25/syntaxHighlight/javascript.js' ); mw.loader.localLoad( 'User:Ultradude25/syntaxHighlight/css.js' );

/* Adds Doc and Doc talk tabs to template pages and change Template and Talk tabs to always link to the original template and talk page */ if ( mw.config.get( 'wgNamespaceNumber' ) === 10 || mw.config.get( 'wgNamespaceNumber' ) === 11 ) { mw.loader.localLoad( 'User:Ultradude25/docTabs.js' ); }

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

} );