User:Kanegasi/common.js

// Counts all your edits and saves them to a page ( http://www.minecraftwiki.net/wiki/User:Kanegasi/editcounter.js )

if (mw.config.get('wgTitle') === mw.config.get('wgUserName') && mw.config.get('wgNamespaceNumber') === 2) {

var pagename = 'edit count', scriptpage = 'User:Kanegasi/editcounter.js', transcludeall = false, tableconfig = 'class="wikitable"', toprowconfig = '', bottomrowconfig = '';

importScript( scriptpage ); }

// Just drag and drop everything above into your common.js page ( Example: User:Kanegasi/common.js ) // pagename is where you want the edit table ( Example: 'edit count' puts it at User:Kanegasi/edit count ) // scriptpage is the location of the script ( if on minecraftwiki, leave it alone unless you want the script in your space ) // transcludeall sets transclude options ( false transcludes only the total edits and date, true transcludes the whole table ) // The three "config" values are all wiki table options, such as class, style, etc // If you are from another wiki, you need to copy over the full script at the URL above

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

} );