MediaWiki:Gadget-blocktab.js: Difference between revisions
Jump to navigation
Jump to search
Want an adless experience? Log in or Create an account.
(Created page.) |
m (Testing something.) |
||
Line 1: | Line 1: | ||
$( function() { | |||
if ( var rights_isAdmin == 'false' ) { | |||
jQuery( document ).ready( function() { | jQuery( document ).ready( function() { | ||
var ns = mw.config.get( 'wgNamespaceNumber' ); | var ns = mw.config.get( 'wgNamespaceNumber' ); | ||
Line 14: | Line 16: | ||
); | ); | ||
}); | |||
} | |||
}); | }); |
Revision as of 03:49, October 24, 2011
$( function() { if ( var rights_isAdmin == 'false' ) { 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' ); // @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 + '"' ); }); } });