User:Azjps/monobook.js
Note: After saving, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
function addLink(where, url, name, id, title, key, after) {
// addLink() accepts either an id or a DOM node, addPortletLink() only takes a node
if (after && !after.cloneNode)
after = document.getElementById(after);
return addPortletLink(where, url, name, id, title, key, after);
}
function addShortcut(){
var p = prompt("What is the shortcut?","AoPS:");
var d = document; t = d.getElementById('wpTextbox1');
t.value = t.value + "{{shortcut|[[" + p + "]]}}";
}
addOnloadHook(function () {
addLink('aopstopmenubar', 'javascript:addShortcut();','makeShortcut','Add Shortcut','','');
});