Utilisateur:Jmfayard/monobook.js
Un article de Wikipédia, l'encyclopédie libre.
Note : Après avoir sauvegardé, vous devez forcer le rechargement de la page pour voir les changements : Mozilla / Konqueror / Firefox : Shift-Ctrl-R, IE / Opera : Ctrl-F5, Safari : Cmd-R.
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>'); function TodayDate() { m = new Array("janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"); today = new Date(); day = today.getDate(); year = today.getYear(); if (year < 2000) year = year + 1900; return (day + " " + m[today.getMonth()] + " " + year); } navigation_innerHTML= ' <li id="n-mainpage"><a title="Visit the Main Page [alt-z]" accesskey="z" href="/wiki/Accueil">Accueil</a></li>' +' <li title="About the project, what you can do, where to find things" id="n-portal"><a href="/wiki/Wikip%C3%A9dia:Accueil">Communauté</a></li>' +' <li id="n-recentchanges"><a title="The list of recent changes in the wiki. [alt-r]" accesskey="r" href="/wiki/Special:Recentchanges">Modifications récentes</a></li>' +' <li><span title="Page courante du Bistro"><a href="/wiki/Wikipédia:Le Bistro/'+ TodayDate() +'">Bistro</a></span></li>' +' <li title="The place to find out." id="n-help"><a href="/wiki/Aide:Aide">Aide</a></li>' +' <li title="Portail Espéranto" id="n-portail"><a href="/wiki/Portail:Espéranto">Portail Espéranto</a></li>' +' <li title="Projet Espéranto" id="n-projet"><a href="/wiki/Wikipédia:Projet, Espéranto">Projet Espéranto</a></li>' +' <li title="Suivi des liens sur l espéranto" id="n-suiviliens"><a href="/wiki/Special:Recentchangeslinked/Cat%C3%A9gorie:Esp%C3%A9ranto">Suivi des liens</a></li>' ; 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 AccueilBis() { document.getElementById("p-logo").getElementsByTagName("a")[0] .setAttribute( "href", "/wiki/Accueil_bis" ) ; } addLoadEvent( AccueilBis) ; 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 ) ; // Bouton supplémentaire Google, voir Utilisateur:Dake/Javascript function OngletRecherche() { var a = document.getElementById("p-cactions"); if (a) { var pageName = document.title.replace(" - Wikipédia", ""); b = a.getElementsByTagName("ul"); if(b.length > 0) { b[0].innerHTML = b[0].innerHTML + '<li id="ca-nstab-user"> Recherche : ' + '<a href="http://www.google.fr/search?num=20&hl=fr&safe=off&q=' + pageName + '&btnG=Search">' + '<img src="http://www.google.com/intl/en/logos/Logo_60wht.gif" height="20px" alt="(google)">' + '</a>' + '<a href="http://www.google.fr/search?num=20&hl=fr&safe=off&q=site%3Afr.wikipedia.org+' + pageName + '&btnG=Search">' + '(wikipédia)</a>' + '<a href="http://atilf.atilf.fr/dendien/scripts/fast.exe?' + pageName + '">' + ' (dico)' + '</li>'; } } } addLoadEvent(OngletRecherche); // auteur : Utilisateur:Solensean function DeluxeBar() { if (document.createTextNode) { var toolbar = document.getElementById("toolbar"); if (!toolbar) return; var messages = new Array() // le texte a été splitté sinon Mediawiki casse tout... messages[0] = "{{subst:" + "Bienvenue sur ta page" + "}}" + "~~" + "~~"; messages[1] = "{{subst:" + "Bienvenue" + "}}" + "--" + "~~" + "~~"; messages[2] = "{{subst:" + "Bienvenue vandale" + "}}" + "--" + "~~" + "~~"; var images = new Array() images[0] = "http://upload.wikimedia.org/wikipedia/fr/1/12/Button_accueilA.png"; images[1] = "http://upload.wikimedia.org/wikipedia/fr/e/eb/Button_accueilB.png"; images[2] = "http://upload.wikimedia.org/wikipedia/fr/0/00/Button_vandale.png"; for (var i=0;i<messages.length;i++) { var img = document.createElement("img"); img.setAttribute("src", images[i]); var ref = document.createElement("a"); ref.setAttribute("href", "javascript:insertTags('', \"" + messages[i] + "\", '');"); ref.appendChild(img); toolbar.appendChild(ref); } } } addLoadEvent(DeluxeBar);