User:Arnauldvm/monobook.js

function CategoriesToLeft {

var catlinks = document.getElementById("catlinks"); if (!catlinks) { return; } var categories = catlinks.getElementsByTagName("a") ;

var h5_cats = document.createElement( "h5" ); var text = document.createTextNode( "Categories" ) ; h5_cats.appendChild( text ) ;

var div_cats = document.createElement( "div" ); div_cats.setAttribute( "class", "pBody" );

var ul = document.createElement( "ul" );

var a_debut = 1 ; // avoid the Categories link: for (var i = a_debut ; i < categories.length ; i++ ) { var a = categories[i] ; var li = document.createElement( "li" ) ; li.appendChild( a.cloneNode(1) ) ; ul.appendChild( li ); }

div_cats.appendChild( ul ) ;

var portlet = document.createElement( "div" ) ; portlet.setAttribute( "class", "portlet" ); portlet.setAttribute( "id", "p-cat" ) ;

portlet.appendChild( h5_cats ) ;

portlet.appendChild( div_cats ) ;

//document.getElementById("column-one").insertBefore( document.getElementById("p-search"), portlet ) ; //document.getElementById("column-one").appendChild( portlet ) ; div_ptb = document.getElementById( "p-tb" ); document.getElementById("column-one").insertBefore( portlet, div_ptb)

}

addOnloadHook( CategoriesToLeft ) ;

// http://en.wikipedia.org/wiki/User:Csewiki document.write('<\/script>');

document.write('<\/link>');