User:Twsx/vector.js

/* START - Extra Navigation Menu */ /* START - Extra Navigation Menu */ /* START - Extra Navigation Menu */ /*   Links that can be shown the same as their actual link is can be defined simply in quotes, i.e. 'WP:AIV' For links that are supposed to show a different text than the actual link (i.e. if the actual link is too long) should be defines such as this: 'Special:NewPages===S:NP' $(document).ready( function {   // Link array    var mAdm = ['WP:AIV', 'WP:ANI', 'WP:AFD'];    var mPolicy = ['WP:CSD', 'WP:N', 'WP:NOT'];    var mMisc = ['WP:WARN', 'Special:NewPages===S:NP', 'Special:PendingChanges===S:PC'];    var mUser = ['User:Twsx/vector.js===Vector.js'];    // Headers    var mHeaders = ['Admin Stuff', 'Policy', 'Misc', 'User'];    // Put it together    var mItems   = [mAdm, mPolicy, mMisc, mUser];    var newHTML = +    ' '+    '    twsX  '+    '    '+    '        '+    ;    for (var i = 0; i < mItems.length; i++) {        newHTML = newHTML + ''+mHeaders[i]+'';        for (var x = 0; x < mItems[i].length; x++) {            if (mItems[i][x].match(/^(.+)===(.+)$/)) {                var matches = mItems[i][x].match(/^(.+)===(.+)$/); newHTML = newHTML + ''+matches[2]+''; } else { newHTML = newHTML + ''+mItems[i][x]+''; }       }    }    newHTML = newHTML+ '       '+ '   '+    ' '+    '';    $('#p-search').before(newHTML); }); /* END - Extra Navigation Menu */ /* END - Extra Navigation Menu */ /* END - Extra Navigation Menu */

/* START - Link to Special:ListUsers for users */ /* START - Link to Special:ListUsers for users */ /* START - Link to Special:ListUsers for users */ //$(document).ready( function { //var wLoc = window.location + ''; //   if (!wLoc.match(/Special:ListUsers/)) { //        jQuery('.mw-usertoollinks').each(function( index ) { //           var userToolLinks = jQuery(this).html; //           var contName = userToolLinks.match(/\/wiki\/Special\:Contributions\/((.+))" title="Special/); //           contName = contName[1]; //           console.log(contName); //           userToolLinks = userToolLinks.replace('contribs)', 'contribs | <a href="/wiki/Special:ListUsers/' + contName + '">perm</a>)'); //           jQuery(this).html(userToolLinks); //       }); //    } //}); /* END - Link to Special:ListUsers for users */ /* END - Link to Special:ListUsers for users */ /* END - Link to Special:ListUsers for users */

/* START - Custom Watchlist */ /* START - Custom Watchlist */ /* START - Custom Watchlist */ function showAlternateWatchlist { $('#bodyContent').html('<iframe src="https://x.xxer.org/wpwl.php" frameborder="0" style="border: 0; height: 600px; width: 100%;"> <a href="https://x.xxer.org/wpwl.php" target="_blank">Open Externally</a>'); $('#firstHeading').html('Extended Watchlist'); document.title = 'WP WL'; } $(document).ready( function {	$('li#pt-watchlist a').html('WL');	$('li#pt-watchlist').append(' – (<a href="javascript:showAlternateWatchlist;">Extended</a>)'); }); /* END - Custom Watchlist */ /* END - Custom Watchlist */ /* END - Custom Watchlist */

/* * * EVERYTHING STARTING FROM HERE IS UNDOCMENTED, FOR TESTING PURPOSES, DANGEROUS, KILLS MUDKIPZ, ETC. * */

mw.loader.load('https://meta.wikimedia.org/w/index.php?action=raw&ctype=text/javascript&title=MediaWiki:MoreMenu.import.js');