Utilisateur:Fourvin/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.
<!-- function addLoadEvent(func) { if (window.addEventListener) { window.addEventListener("load", func, false); } else if (window.attachEvent) { window.attachEvent("onload", func); } } function nouvelleBoite() { var l = document.getElementById("column-one"); if (l) { l.innerHTML = l.innerHTML + '<div class="portlet" id="p-nbx">' + ' <h5>Boîte perso</h5>' + ' <div class="pBody">' + ' <ul>' + ' <li style="font-size:7px">[[Catégorie:Titre de film en *]]<BR>[[Catégorie:Adaptation d une œuvre littéraire au cinéma]]' + ' <li><a href="http://french.imdb.com/search">IMDb</a> - <a href="http://allocine.fr">AlloCiné</a>' + ' <li>Scripts <a href="http://okki666.free.fr/wikipedia/">Gq</a> - <a href="http://bulat.nerim.net/wikipedia/">filmo</a>' + ' <li><a href="http://wiki.beyondunreal.com/cgi-bin/reverser.cgi">Reverser</a><BR /><HR></li>' + ' <li><a href="http://fr.wikipedia.org/w/index.php?title=Wikip%C3%A9dia:Le_Bistro&action=purge">Le Bistro</a></li>' + ' <li><a href="http://fr.wikipedia.org/wiki/Special:Newpages">Nouvelles pages</a>' + ' </ul>' + ' </div>' + '</div> '; } } addLoadEvent(nouvelleBoite); function insertAfter(parent, node, referenceNode) { parent.insertBefore(node, referenceNode.nextSibling); } function OptimizedSuivi() { if (document.URL.indexOf("http://fr.wikipedia.org/wiki/Special:Watchlist")==0 || document.URL.indexOf("http://fr.wikipedia.org/w/index.php?title=Special:Watchlist")==0 ){ var allDays = document.getElementsByTagName("ul"); for (i=0; i<allDays.length; i++) { if (allDays[i].getAttribute("class") == "special") { var artList = allDays[i].getElementsByTagName("li"); for (j=0; j<artList.length; j++) { var elem = artList[j]; var aTag = elem.getElementsByTagName("a"); var articleName = aTag[0].getAttribute("title"); var stopWatch = "/w/index.php?title=" + articleName + "&action=unwatch" var newElement = document.createElement("a"); newElement.setAttribute("href",stopWatch); var newText = document.createTextNode("stop"); newElement.appendChild(newText); var newPar = document.createTextNode(") (") // séparation des cas (nouvel article, ou déjà existant) if (aTag[0].childNodes[0].data == "diff") { insertAfter(elem, newPar, aTag[1]); } else { insertAfter(elem, newPar, aTag[0]); } insertAfter(elem, newElement, newPar); } } } } } addLoadEvent(OptimizedSuivi); -->