User:Chris-martin/monobook.js/Unused

This page archives code from monobook.js which I no longer use.

/*function onWheels { var header = getArticleHeader; if (header == false) return false; replaceText(header, header.firstChild.nodeValue + " ON WHEELS!!!~!"); } addOnload(onWheels);*/

//-

/** * Script from Kate's Tool, modified for Interiot's tool. * Adds an edit count link to monobook "personal menu" list at the top of every page. * * Indicate where you would link should appear: * pt-userpage, pt-mytalk, pt-preferences, pt-watchlist, pt-mycontris, pt-logout */ gsKateInsertBefore = 'pt-mycontris'; // leave blank to append after "logout" function KateLink { var user = document.getElementById('ca-edit').getElementsByTagName('a')[0].href; user = user.substring(user.indexOf('title=') + 6, user.lastIndexOf('&action=edit')); user = user.substring(user.indexOf(':') + 1); var li = document.createElement( 'li' ); li.id = 'pt-kate'; var a = document.createElement( 'a' ); a.appendChild( document.createTextNode( 'edit count' ) ); // the css makes the text lowercase a.href = 'http://tools.wikimedia.de/~interiot/cgi-bin/count_edits?user=' + user + '&dbname=enwiki_p'; li.appendChild( a ); if ( ! gsKateInsertBefore ) { // append to end (right) of list document.getElementById( 'pt-logout' ).parentNode.appendChild( li ); } else { var before = document.getElementById( gsKateInsertBefore ); before.appendChild( li, before ); } } addOnload(KateLink);