Utilisateur:Cyrildemont/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('User:EDUCA33E/LiveRC.js'); // évaluation Projet-Franche-Comté var alwaysEval = false; function initEvalProjectNames() { evalProjectNames=new Array(); // evalProjectNames.push("Franche-Comté") } /** * Bistro du jour * * Lien vers le bistro du jour dans le panneau de navigation * * Auteur : ?? * Contributeur : Tieno * Dernière révision : 12 novembre 2006 * [[Catégorie:MediaWiki:Fonction Monobook en JavaScript]] */ 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); } function BistroDuJour() { var a = document.getElementById("p-navigation"); if (a) { b = a.getElementsByTagName("ul"); if(b.length > 0) { b[0].innerHTML = b[0].innerHTML + '<li><span id="n-bistro" title="Wikipédia:Le Bistro">' + '<a href="/wiki/Wikipédia:Le_Bistro/' + TodayDate() + '">Bistro du jour</a>' + '</span></li>'; } } } addOnloadHook(BistroDuJour);