User:Geagea/adminwatch.js
Jump to navigation
Jump to search
Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
Documentation for this user script can be added at User:Geagea/adminwatch. |
// Fork of [[User:Geagea/adminwatch.js]]
/**
* Add useful information about requests at the top of the page.
* [[nl:User:Basvb]] (https://nl.wikipedia.org/w/index.php?title=Gebruiker:Basvb/nuwegscript.js&oldid=33744897);
* Derivative work: [[User:Steinsplitter]];
* Improved by [[:de:Benutzer:Gorlingor]]
*/
$.when( mw.loader.using( 'mediawiki.api' ), mw.loader.using( 'mediawiki.util' ), $.ready ).then( function () {
'use strict';
var api = new mw.Api();
api.post( {
action: 'purge',
titles: 'User:Geagea/adminwatch.js/raw'
} );
api.post( {
action: 'parse',
page: 'User:Geagea/adminwatch.js/raw'
} ).done( function ( data ) {
var menuItem = mw.util.addPortletLink( 'p-personal', '', '', 'pt-adminwatch', null, null, 'li:first' );
$(menuItem).html( data.parse.text[ '*' ] );
} );
} );