Difference between revisions of "User:Markhurd/common.js"
m (Fix enwikilinks) |
(Try adding the #R toolbar button) |
||
| Line 8: | Line 8: | ||
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Cacycle/wikEdDiff.js' | mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Cacycle/wikEdDiff.js' | ||
+ '&action=raw&ctype=text/javascript'); | + '&action=raw&ctype=text/javascript'); | ||
| + | |||
| + | /*global mw, importScriptURI, importScript */ | ||
| + | /*jshint strict: false, browser: true, jquery: true */ | ||
| + | /** | ||
| + | * Extra toolbar options | ||
| + | * | ||
| + | * Description: Adds extra buttons to the old (non-enhanced) editing toolbar. | ||
| + | * | ||
| + | * Maintainers: [[User:MarkS]], [[User:Voice of All]], [[User:R. Koot]] | ||
| + | * | ||
| + | * MEH: Just include Redirect. | ||
| + | */ | ||
| + | |||
| + | mw.loader.using( 'mediawiki.action.edit', function () { | ||
| + | var buttons, i, len; | ||
| + | |||
| + | buttons = [ | ||
| + | { | ||
| + | 'imageId': 'button-redirect', | ||
| + | 'imageFile': '//upload.wikimedia.org/wikipedia/en/c/c8/Button_redirect.png', | ||
| + | 'speedTip': 'Redirect', | ||
| + | 'tagOpen': '#REDIRECT[[', | ||
| + | 'tagClose': ']]', | ||
| + | 'sampleText': 'Target page name' | ||
| + | } | ||
| + | ]; | ||
| + | |||
| + | for ( i = 0, len = buttons.length; i < len; i++ ) { | ||
| + | mw.toolbar.addButton( buttons[i] ); | ||
| + | } | ||
| + | |||
| + | }); | ||
Revision as of 18:58, 19 April 2013
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');
/*global mw, importScriptURI, importScript */
/*jshint strict: false, browser: true, jquery: true */
/**
* Extra toolbar options
*
* Description: Adds extra buttons to the old (non-enhanced) editing toolbar.
*
* Maintainers: [[User:MarkS]], [[User:Voice of All]], [[User:R. Koot]]
*
* MEH: Just include Redirect.
*/
mw.loader.using( 'mediawiki.action.edit', function () {
var buttons, i, len;
buttons = [
{
'imageId': 'button-redirect',
'imageFile': '//upload.wikimedia.org/wikipedia/en/c/c8/Button_redirect.png',
'speedTip': 'Redirect',
'tagOpen': '#REDIRECT[[',
'tagClose': ']]',
'sampleText': 'Target page name'
}
];
for ( i = 0, len = buttons.length; i < len; i++ ) {
mw.toolbar.addButton( buttons[i] );
}
});
