Jump to content

User:Pabix/LRC.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Pabix (talk | contribs) at 06:14, 15 May 2007. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
/*<pre><nowiki>*/
function addLoadEvent(func) {
  if (window.addEventListener) {
    window.addEventListener("load", func, false);
  } else 
  if (window.attachEvent) {
    window.attachEvent("onload", func);
  }
}
function insertAfter(parent, node, referenceNode) {
    parent.insertBefore(node, referenceNode.nextSibling);
}
function LRC_Shortcut(){
  var rp=document.getElementById("n-randompage");
  var line=document.createElement("li");
  with(line) {
    innerHTML="<a href='http://en.wikipedia.org/wiki/User:EDUCA33E/LiveRC'>LiveRC</a>";
  }
  rp.parentNode.appendChild(line);
}
addLoadEvent(LRC_Shortcut);
/*</nowiki></pre>*/