MediaWiki:Monobook.js

/* See also: MediaWiki:Common.js



/* Functions for adding links to the personal links section and the toolbox*/ function AddPersonalLink(link, text, tag, ibefore) { var li = document.createElement( 'li' ); li.id = tag; var a = document.createElement( 'a' ); a.appendChild( document.createTextNode( text ) ); a.href = link; li.appendChild( a ); if ( ! ibefore ) // append to end (right) of list {    document.getElementById( 'pt-logout' ).parentNode.appendChild( li ); } else {     var before = document.getElementById( ibefore ); before.appendChild( li, before ); } }

function AddToolboxLink(text, href, onclick, linkid) { var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0]; var link = document.createElement('a'); link.onclick = onclick; link.href = href; link.appendChild(document.createTextNode(text));

var li = document.createElement('li'); li.id = linkid; li.appendChild(link);

tb.insertBefore(li, tb.firstChild); return; } /*