User:NKohli (WMF)/global.js
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
// Add the backend response time and server name to the personal bar.
function showBackendPerformance() {
var respTime = mw.config.get( 'wgBackendResponseTime' ),
caption = respTime.toString() + 'ms ('
+ mw.config.get( 'wgHostname' ).toString() + ')';
$( '<li>' ).html( caption ).prependTo( '#p-personal ul' );
}
// WhoWroteThat test
mw.loader.load( 'https://www.mediawiki.org/w/index.php?title=User:MSchottlender-WMF/WhoWroteThat.js&action=raw&ctype=text/javascript' );
$( window ).on( 'load', showBackendPerformance );
// CU Helper scripts
mw.loader.load( 'https://en.wikipedia.org/w/index.php?title=User:Amalthea/culoghelper.js&action=raw&ctype=text/javascript');
//mw.loader.load();
//mw.loader.load();
// GeneralNotability's IP info script
mw.loader.load( 'https://en.wikipedia.org/w/index.php?title=User:GeneralNotability/ip-ext-info.js&action=raw&ctype=text/javascript' );
// TemplateMaster (https://de.wikipedia.org/wiki/Wikipedia:Technik/Skin/Gadgets/Vorlagenmeister)
mw.loader.load( "//de.wikipedia.org/w/index.php?title=MediaWiki:Gadget-Vorlagenmeister.js&action=raw&ctype=text/javascript",
"text/javascript");
// Template wizard - he version
// mw.loader.load( "https://he.wikipedia.org/wiki/מדיה_ויקי:Gadget-TemplateParamWizard.js&action=raw&ctype=text/javascript", "text/javascript");
// UserInfo script
mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:PleaseStand/userinfo.js&action=raw&ctype=text/javascript' );
// Autocomplete category/template names gadget by Eran
mw.loader.load( '//he.wikipedia.org/w/index.php?title=מדיה_ויקי:Gadget-autocomplete.js&action=raw&ctype=text/javascript' );
// Nightpedia
mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:NKohli (WMF)/nightpedia2.js&action=raw&ctype=text/javascript' );
function compilemmlist() {
$('#p-personal').find('ul').append('<li>MM</li>').click(function(){
str = $('#wpTextbox1').text();
reg = /\[\[User:(.*?)\|/g;
var match, arr = [];
while (match = reg.exec(str)) {
if (match[1]) {
arr.push("* {{target | user=" + match[1] + " | site=meta.wikimedia.org}}");
}
}
var result = [];
$( '#wpTextbox1' ).val("");
$.each(arr, function(i, e) {
if ($.inArray(e, result) == -1) {
result.push(e);
$( '#wpTextbox1' ).val( $( '#wpTextbox1' ).val() + "\n" + e );
}
});
});
}
$( document ).ready( function () {
compilemmlist();
});
// TemplateWizard
// mw.loader.load( 'https://en.wikipedia.org/w/index.php?title=User:Samwilson/TemplateWizard.js&action=raw&ctype=text/javascript' );