User:Majr/hydra.js

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

// User:Majr/ajaxPreview.js // Uses AJAX for previewing and showing changes - Original script: wikipedia:User:Js/ajaxPreview.js if ( mw.config.get( 'wgAction' ) === 'edit' || mw.config.get( 'wgAction' ) === 'submit' ) { mw.loader.localLoad( 'User:Majr/ajaxPreview.js' ); }

// User:Majr/editcounter.js // Counts all your edits and saves them to a page - Original script: http://strategywiki.org/wiki/User_talk:Najzere/edit_counter.js if ( mw.config.get( 'wgTitle' ) === mw.config.get( 'wgUserName' ) && mw.config.get( 'wgNamespaceNumber' ) === 2 ) { mw.loader.localLoad( 'User:Majr/editcounter.js' ); }

// User:Majr/Prism.js // Adds JavaScript, CSS and Lua syntax highlighting, see file for license // Requires a theme from http://prismjs.com to be added to usercss mw.loader.localLoad( 'User:Majr/Prism.js' );

// User:Majr/codeLinks.js // Make links work in code blocks mw.loader.localLoad( 'User:Majr/codeLinks.js' );

// User:Majr/docTabs.js // Adds Doc + Doc discussion tabs to template, module and user css/js pages and // changes Template/Module/User + Discussion tabs to always link to the // original template/module/user + discussion pages if ( 	$.inArray( mw.config.get( 'wgNamespaceNumber' ), [ 10, 11, 828, 829 ] ) > -1 ||	$.inArray( mw.config.get( 'wgNamespaceNumber' ), [ 2, 3 ] ) > -1 &&	mw.config.get( 'wgTitle' ).replace( /\/doc$/, '' ).search( /\.(js|css)$/ ) > -1 ) { importScript( 'User:Majr/docTabs.js' ); }

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

// User:Majr/twitterFeed.js // Parse tweets //mw.loader.localLoad( 'User:Majr/twitterFeed.js' );

// User:Majr/refTooltip.js // Test ref tooltips mw.loader.localLoad( 'User:Majr/refTooltip.js' );

// User:Majr/bugSummary.js // Test bug titles //mw.loader.localLoad( 'User:Majr/bugSummary.js' );

// User:Majr/tidyDisplayName.js // Tidies up the display name text, removing duplicates and confusion //mw.loader.localLoad( 'User:Majr/tidyDisplayName.js' );

// User:Majr/inputCounter.js // Adds a character counter to input fields mw.loader.localLoad( 'User:Majr/inputCounter.js' );

// User:Majr/renderConsoleOutput.js // Allows the output wikitext of the lua console to be rendered if ( $( '#mw-scribunto-console' ).length ) { mw.loader.localLoad( 'User:Majr/renderConsoleOutput.js' ); }

$( function { 'use strict';

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

// Changes vector menu items into tabs $( '#p-cactions' ).addClass( 'emptyPortlet' ).find( '> .menu li' ).addClass( 'collapsible' ).find( 'a' ).wrap( ' ' ).end.appendTo( '#p-views > ul' ); /*setTimeout( function {	mw.loader.using( ['jquery.collapsibleTabs', 'ext.vector.collapsibleTabs'], function { $.collapsibleTabs.handleResize; } ); }, 1000 );*/

// Changes netbar user details menu into sections $( '.t-netbar-account ul' ).find( '.break' ).remove.end .find( 'li > a' ).addClass( 't-netbar-label' ).wrap( ' ' ).end .find( 'li > div' ).first.find( '> a' ).text( $( '.t-netbar-account ul' ).find( '.user-name' ).text ).end.end .appendTo( '.t-netbar-userInfo' ); $( '.t-netbar-account, .t-netbar-avatar' ).remove;

// 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( /minecraft\.gamepedia\.com\/index\.php\?title=([^&]*)&(?!action=(?:un)?watch&token=)(.*)/, "minecraft.gamepedia.com/$1?$2" ); } );*/

// Modify the text added by the signature button. if ( $.inArray( mw.config.get( 'wgAction' ), [ 'edit', 'submit' ] ) > -1 ) { mw.loader.using( 'ext.wikiEditor.toolbar', function {		var $button = $( '#wikiEditor-section-main > .group-insert > a[title="Signature and timestamp"]' )		var action = $button.data( 'action' );		action.options.pre = ' ' + ' ';		$button.data( 'action', action );	} ); }

} );