Difference between revisions of "User:Markhurd/common.js"
(Seeing as I'm only adding one button, add it alone directly, as documented) |
(Seeing as I'm only adding one button, add it alone directly, as documented, and now, seeing as it's working, remove extra guff) |
||
Line 12: | Line 12: | ||
+ '&action=raw&ctype=text/javascript'); | + '&action=raw&ctype=text/javascript'); | ||
− | / | + | /* |
− | + | * Add Redirect toolbar button. | |
− | |||
− | * | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
*/ | */ | ||
mw.loader.using( 'mediawiki.action.edit', function () { | mw.loader.using( 'mediawiki.action.edit', function () { | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
mw.toolbar.addButton( | mw.toolbar.addButton( | ||
'//upload.wikimedia.org/wikipedia/en/c/c8/Button_redirect.png', | '//upload.wikimedia.org/wikipedia/en/c/c8/Button_redirect.png', | ||
'Redirect', | 'Redirect', | ||
− | '#REDIRECT[[', | + | '#REDIRECT [' + '[', |
']]', | ']]', | ||
'Target page name', | 'Target page name', |
Revision as of 12:56, 20 April 2013
mw.loader.load('//pt.wikibooks.org/w/index.php?title=Utilizador:Helder.wiki/Tools/DebugModeToggle.js' +'&action=raw&ctype=text/javascript'); userHideAllSubsequent=true; // [[:wikipedia:User:Markhurd/hidetopcontrib.js]] mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Markhurd/hidetopcontrib.js' + '&action=raw&ctype=text/javascript'); // [[:wikipedia:User:Cacycle/wikEdDiff.js]] mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Cacycle/wikEdDiff.js' + '&action=raw&ctype=text/javascript'); /* * Add Redirect toolbar button. */ mw.loader.using( 'mediawiki.action.edit', function () { mw.toolbar.addButton( '//upload.wikimedia.org/wikipedia/en/c/c8/Button_redirect.png', 'Redirect', '#REDIRECT [' + '[', ']]', 'Target page name', 'button-redirect', true ); });