User:Kanegasi/common.js

/* Counts all your edits and saves them to a page ( http://www.minecraftwiki.net/wiki/User_talk:Kanegasi/editcounter.js ) */ if (mw.config.get('wgTitle') === mw.config.get('wgUserName') && mw.config.get('wgNamespaceNumber') === 2) { var pageName = 'edit count'; var scriptPage = 'User:Kanegasi/editcounter.js'; var transcludeAll = false; var tableHeaders = false; var mainDivAttrib = 'style="margin-bottom: 1em; text-align: center"'; var mainTableAttrib = 'cellpadding=5 cellspacing=1 style="margin: 0 auto"'; var topRowAttrib = 'style="background-color: #729FCF; font-size: small; color: black"'; var bottomRowAttrib = 'style="background-color: white; font-size: large; color: black"'; mw.loader.load('http://www.minecraftwiki.net/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 */ importScript( 'User:Kanegasi/editsummarypresets.js' ); var customSummaries = [ 'already mentioned', 'comment', 'general layout fix', 'grammar/spelling fix', 'Minecraft Forums' + '', 'Mojang license', 'needs citation', 'pointless', 'reply', 'section header', 'Interwiki link', 'subjective', 'unnecessary', 'Rule#1: Violates ToU/brand guidelines', 'Rule#2: Spam', 'Rule#2: Vandalism', 'Rule#3: Too simple/outside wiki\'s scope', 'Rule#4: Lack of content', 'Rule#5: Harassment/insult', 'Rule#6: Not a Moj' + 'angster', 'Rule#7: Speculation/fake', 'Rule#8: Belongs in Tutor' + 'ials', 'Rule#10: Server advertising', 'Rule#11: Community advertising', 'Rule#15: Mod info in vanilla article', 'Rule#16: Video policy', 'Rule#18: Signature', 'Rule#19: Does not exist', 'Rule#20: Custom textures/UI/mods', 'Rule#22: Template as signature', 'Rule#23: Not tutorial material', ];

/* Wikipedia's HotCat gadget ( http://en.wikipedia.org/wiki/Wikipedia:HotCat ) */ importScript( 'User:Kanegasi/HotCat.js' );

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

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

/* Allows rollback summary to be edited */ importScript( '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 .menu li' ).addClass( 'collapsible' ); $( '#p-cactions .menu li a' ).wrap( ' ' ); $( '#p-views ul li:last' ).after( $( '#p-cactions .menu li' ) ); $( '#p-cactions' ).addClass( 'emptyPortlet' );

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

} );