MediaWiki:Common.js/ExtraTools.js
Appearance
Note: After saving, changes may not occur immediately. Click here to learn how to bypass your browser's cache.
- Mozilla / Firefox / Safari: hold down Shift while clicking Reload, or press Ctrl-Shift-R (Cmd-Shift-R on Apple Mac);
- Internet Explorer: hold Ctrl while clicking Refresh, or press Ctrl-F5;
- Konqueror: simply click the Reload button, or press F5;
- Opera users may need to completely clear their cache in Tools→Preferences.
This is JavaScript for all users. You can propose changes on the discussion page or at the proposals reading room. Errors made here can disrupt Wikibooks. You can test changes in your personal JavaScript first. Due to caching, changes can take up to 31 days before propagating to all users. |
(function(mw, $) {
window.add_toolbox_link = function(action, name, id) {
var $tools = $('#p-tb ul');
if ( !$tools.length ) return;
if (typeof action === "string") {
$tools.append('<li id="t-' + (id || name) + '"><a href="' + action + '">' + name + '</a></li>');
} else if (typeof action === "function") {
$('<li id="t-' + (id || name) + '"><a href="#">' + name + '</a></li>').appendTo($tools).click(action);
}
};
mw.hook('wikibooks.panels.tools').fire(mw, $);
})(mediaWiki, jQuery);