MediaWiki:Gadget-blocktab.js: Difference between revisions
Jump to navigation
Jump to search
Want an adless experience? Log in or Create an account.
(Forget that.; Restore to version 6137 by Matt) |
mNo edit summary |
||
Line 7: | Line 7: | ||
} | } | ||
var title = mw.config.get( 'wgTitle' ); | var title = mw.config.get( 'wgTitle' ).split('/')[0]; | ||
// @todo: Use mw.msg when Gadgets 2.0 is out and messages can be loaded | // @todo: Use mw.msg when Gadgets 2.0 is out and messages can be loaded |
Revision as of 19:23, November 8, 2011
$( function() { if ( wgUserGroups.toString().indexOf('sysop') != -1 ) { jQuery( document ).ready( function() { var ns = mw.config.get( 'wgNamespaceNumber' ); if ( ns !== 2 && ns !== 3 ) { return; // restrict to User and User talk } var title = mw.config.get( 'wgTitle' ).split('/')[0]; // @todo: Use mw.msg when Gadgets 2.0 is out and messages can be loaded mw.util.addPortletLink( 'p-cactions', mw.util.wikiGetlink( 'Special:Block/' + title ), 'Block', 't-blockip', 'Block "' + title + '"' ); }); } });