Utilisateur:Gede/monobook.js
Apparence
Note : après avoir enregistré la page, vous devrez forcer le rechargement complet du cache de votre navigateur pour voir les changements.
Mozilla / Firefox / Konqueror / Safari : maintenez la touche Majuscule (Shift) en cliquant sur le bouton Actualiser (Reload) ou pressez Maj-Ctrl-R (Cmd-R sur Apple Mac) ;
Firefox (sur GNU/Linux) / Chrome / Internet Explorer / Opera : maintenez la touche Ctrl en cliquant sur le bouton Actualiser ou pressez Ctrl-F5./* Aide:Personnalisation */
/* Aide:Monobook */
/* Aide:Sommaire/Les informations techniques */
/*ajout nombre de consulations */
function addArticleTrafficStatistics()
{
var histo = document.getElementById("ca-history");
if(histo)
{
var lien = document.createElement("a");
var today = new Date();
var annee = today.getYear() + 1900;
var mois = new String(today.getMonth() + 1);
if(mois.length < 2)
{
mois = "0" + mois;
}
lien.setAttribute("href", "http://stats.grok.se/fr/" + annee + mois + "/" + mw.config.get('wgPageName'));
lien.appendChild(document.createTextNode("nombre de consulations"));
var stats = document.createElement("li");
stats.setAttribute("id", "ca-stats");
stats.appendChild(lien);
histo.parentNode.insertBefore(stats, histo.nextSibling);
}
}
addOnloadHook(addArticleTrafficStatistics);
importScript('User:Alphos/historyselect.js');
/* D'après DainDwarf*/
/* <pre> <nowiki> */
/*Pour avoir la date du jour*/
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);
}