Difference between revisions of "User:Azjps/monobook.js"
(testing) |
(No difference)
|
Revision as of 16:14, 29 January 2007
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','','');
});