User:Calvin 1998/Sandbox 2
From Wikipedia, the free encyclopedia
| I am currently online. Any messages should be replied to within 15 minutes.
|
|||||||||
| Userpage | Talk page | Awards | Sandbox | Sandbox 2 | Subpages | Recent Work | Article Drafts | Coaching | |
Testing a monobook script to add some links to the linkbar (pt-userpage, pt-mytalk, pt-preferences, pt-watchlist, pt-mycontris, pt-logout). Don't use it, as it probably won't work.
gsAdd = 'pt-userpage'; // leave blank to append after "logout"
//
function AddLink()
{
var user = document.getElementById( 'pt-userpage').firstChild.firstChild.data;
var li = document.createElement( 'li' );
li.id = 'pt-monobook';
var a = document.createElement( 'a' );
a.appendChild( document.createTextNode( 'Kate' ) ); // eh, the css makes the text lowercase
a.href = 'http://kohl.wikimedia.org/~kate/cgi-bin/count_edits?dbname=enwiki&user=' + user;
li.appendChild( a );
if ( ! gsAdd ) // append to end (right) of list
{ document.getElementById( 'pt-logout' ).parentNode.appendChild( li );
}
else
{ var before = document.getElementById( gsAdd );
before.appendChild( li, before );
}
}
if ( window.addEventListener ) window.addEventListener( 'load', AddLink, false );
else if ( window.attachEvent ) window.attachEvent ( 'onload', AddLink );

