Utilisateur:Emmanuel legrand/monobook.js
Un article de Wikipédia, l'encyclopédie libre.
Note : Après avoir publié la page, vous devrez forcer son rechargement pour voir les changements : Mozilla / Konqueror / Firefox : Shift-Ctrl-R, Internet Explorer / Opera : Ctrl-F5, Safari : Cmd-R.
loadJs('Utilisateur:EDUCA33E/LiveRC.js'); function editerPremierParagraphe() { var modif = document.getElementById("ca-edit").getElementsByTagName("a"); if (modif.length <= 0) return; var url = modif[0].href; var a = document.getElementById("p-cactions"); if (a) { b = a.getElementsByTagName("ul"); if(b.length > 0) { b[0].innerHTML = b[0].innerHTML + '<li><a href="' + url + '§ion=0">modifier 1er paragraphe</a></li>'; } } } addLoadEvent(editerPremierParagraphe); function addLoadEvent(func) { if (window.addEventListener) window.addEventListener("load", func, false); else if (window.attachEvent) window.attachEvent("onload", func); } function Menu() { var tDate = TodayDate(); var a = document.getElementById("p-navigation"); if (a) { b = a.getElementsByTagName("ul"); if (b.length > 0) { b[0].innerHTML = navigation_innerHTML; } } } addLoadEvent(Menu); function insertAfter(parent, node, referenceNode) { if(referenceNode.nextSibling) { parent.insertBefore(node, referenceNode.nextSibling); } else { parent.appendChild(node); } } function CategoriesAGauche() { var catlinks = document.getElementById("catlinks"); if (!catlinks) { return; } var categories = catlinks.getElementsByTagName("a") ; var h5_cats = document.createElement( "h5" ); var text = document.createTextNode( "Catégories" ) ; h5_cats.appendChild( text ) ; var div_cats = document.createElement( "div" ); div_cats.setAttribute( "class", "pBody" ); var ul = document.createElement( "ul" ); var a_debut = 1 ; // evitons le lien Categories: 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) } addLoadEvent( CategoriesAGauche ) ; // [[:en:User:Lupin/popups.js]] document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');