User:Azjps/monobook.js

< User:Azjps
Revision as of 15:14, 29 January 2007 by Azjps (talk | contribs) (testing)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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','','');
    });