User:Kwiki/vector.js

// changes the drop-down menu in Vector into tabs function fixTab(item) { if (item.firstChild.innerHTML.indexOf(' ') == -1) item.firstChild.innerHTML = " " + item.firstChild.innerHTML + " "; } $(function { document.getElementById('p-cactions').className = 'vectorTabs';  var elems = document.getElementById('p-cactions').getElementsByTagName('li');  for (var i = 0; i < elems.length; i++)    fixTab(elems[i]);  var twinkleElem = document.getElementById('p-twinkle');  if (twinkleElem)    twinkleElem.className = 'vectorTabs'; })

importScript('User:Ale_jrb/Scripts/igloo.js'); // User:Ale_jrb/Scripts/igloo

//   pt-userpage, pt-mytalk, pt-preferences, //   pt-watchlist, pt-mycontris, pt-logout

// Places an extra link in the top usermenu

function ExtraLink {         //Defining the content of the wanted button: var li = document.createElement( 'li' ); li.id = 'pt-extralink'; var a = document.createElement( 'a' ); a.appendChild( document.createTextNode( 'My archive' ) ); a.href = 'http://en.wikipedia.org/wiki/User_talk:Kwiki/Archive_1'; li.appendChild( a ); //Defines the place: var before = document.getElementById( 'pt-preferences' ); //You can set here where you want it to place before. before.parentNode.insertBefore( li, before ); //If you want to place it at the end of the menu, replace this line with document.getElementById( 'pt-logout' ).parentNode.appendChild( li );

} if ( window.addEventListener ) window.addEventListener( 'load', ExtraLink, false ); else if ( window.attachEvent     ) window.attachEvent   ( 'onload', ExtraLink );

// Places an extra link in the top usermenu

function ExtraLink2 {         //Defining the content of the wanted button: var li = document.createElement( 'li' ); li.id = 'pt-extralink2'; var a = document.createElement( 'a' ); a.appendChild( document.createTextNode( 'NL' ) ); a.href = 'http://nl.wikipedia.org/wiki/Gebruiker:' + wgUserName; li.appendChild( a ); //Defines the place: var before = document.getElementById( 'pt-mycontris' ); //You can set here where you want it to place before. document.getElementById( 'pt-logout' ).parentNode.appendChild( li );

} if ( window.addEventListener ) window.addEventListener( 'load', ExtraLink2, false ); else if ( window.attachEvent     ) window.attachEvent   ( 'onload', ExtraLink2 );