User:Kyle Barbour/standard.js
From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. In Internet Explorer and Firefox, hold down the Ctrl key and click the Refresh or Reload button. Opera users have to clear their caches through Tools→Preferences, see the instructions for Opera. Konqueror and Safari users can just click the Reload button.
function KateLinkClassicSkin() { // This is tricky, as there are so few tag-IDs to assist us. // I'm placing Kate right after the "User (Talk)" links at top. // var td = document.getElementById( 'topbar' ).getElementsByTagName( 'td' )[ 2 ]; var user = td.getElementsByTagName( 'a' )[ 0 ]; var name = user.firstChild.nodeValue; var loc = td.getElementsByTagName( 'br' )[ 0 ]; // insert before this var kate = document.createElement( 'a' ); kate.appendChild( document.createTextNode( 'Kate' ) ); kate.href = 'http://tools.wikimedia.de/~interiot/cgi-bin/Tool1/wannabe_kate?username=Kyle_Barbour&site=en.wikipedia.org'; td.insertBefore( document.createTextNode( ' ' ), loc ); td.insertBefore( kate, loc ); } if ( window.addEventListener ) window.addEventListener( 'load', KateLinkClassicSkin, false ); else if ( window.attachEvent ) window.attachEvent( 'onload', KateLinkClassicSkin ); // Begin delete link code function addDeleteLink() { var targetSpan = document.getElementById('specialDeleteTarget'); var linkSpan = document.getElementById('specialDeleteLink'); if (targetSpan == null || linkSpan == null) return; var targetLink = targetSpan.getElementsByTagName("A")[0]; if (targetLink == null) return; var targetTitle = targetLink.childNodes[0].data; var deleteHref = "http://en.wikipedia.org/w/index.php?action=delete&title=" + escape(targetTitle); var deleteSpan = null; with (easyDom) { deleteSpan = span({ "class": "plainlinks" }, " (", a({ "href": deleteHref, "class": "external text" }, "delete"), ")"); } linkSpan.appendChild(deleteSpan); } addOnloadHook(addDeleteLink); document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Mike Dillon/Scripts/easydom.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); // End delete link code

