Utilisateur:Localhost/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) ;
Chrome / Internet Explorer / Opera : maintenez la touche Ctrl en cliquant sur le bouton Actualiser ou pressez Ctrl-F5.obtenir("EditZeroth");
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><a href="http://commons.wikimedia.org/wiki/Accueil">Commons </a></li>'
+ ' <li><a href="http://fr.wikipedia.org/wiki/User:Localhost/monobook.js">Monobook.js</a></li>'
+ ' </ul>'
+ ' </div>'
+ '</div> ';
}
}
$(nouvelleBoite);
// [[:en:User:Lupin/popups.js]]
// Traduction de [[Utilisateur:Leag/Navigation popups]]
popupDelay=1
popupImages= false;
imagePopupsForImages=false;
popupLazyDownloads=true;
popupLazyPreviews=true;
importScript('MediaWiki:Gadget-Popups.js');
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>';
}
}
}
$(BistroDuJour);
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("Consultation"));
var stats = document.createElement("li");
stats.setAttribute("id", "ca-stats");
stats.appendChild(lien);
histo.parentNode.insertBefore(stats, histo.nextSibling);
}
}
$(addArticleTrafficStatistics);