Utilisateur:Nias/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.mw.loader.using('mediawiki.util', function () {
/////////////DÉBUT DU CODE DES BOUTONS-PRESSION POUR DISCUSSIONS //////////////
/*
* Bouton-pression DiscussionDeluxe
*
* Barre d'outils permettant l'insertion de modèles pour discussions,
* un commentaire rapide et la signature.
*
* Auteur : Antaya
* Dernière révision : 20 novembre 2007
*/
//////////////////////ZONE PERSONNALISABLE//////////////////////
var signature = ' ~~' + '~~';
addCustomButton('//upload.wikimedia.org/wikipedia/commons/c/c8/Button_conserver2.png','Conserver','#{{vote|conserver}} - ',signature,'Votre commentaire','mw-editbutton-conserver');
addCustomButton('//upload.wikimedia.org/wikipedia/commons/0/00/Button_supprimer.png','Supprimer','#{{vote|supprimer}} - ',signature,'Votre commentaire','mw-editbutton-supprimer');
addCustomButton('//upload.wikimedia.org/wikipedia/commons/1/1d/Button_neutre2.png','Neutre','#{{vote|neutre}} - ',signature,'Votre commentaire','mw-editbutton-neutre');
addCustomButton('//upload.wikimedia.org/wikipedia/commons/4/4d/Button_reticence.png','Réticence','#{{vote|réticence}} - ',signature,'Votre commentaire','mw-editbutton-reticence');
addCustomButton('//upload.wikimedia.org/wikipedia/commons/5/5f/Button_rediriger.png','Rediriger','#{{vote|rediriger}} - ',signature,'Votre commentaire','mw-editbutton-rediriger');
addCustomButton('//upload.wikimedia.org/wikipedia/commons/4/4a/Button_fusionner.png','Fusionner','#{{vote|fusionner}} - ',signature,'Votre commentaire','mw-editbutton-fusionner');
addCustomButton('//upload.wikimedia.org/wikipedia/commons/d/de/Button_bon_article.png','Bon article','#{{vote|bon article}} - ',signature,'Votre commentaire','mw-editbutton-bon-article');
addCustomButton('//upload.wikimedia.org/wikipedia/commons/3/3f/Button_attendre.png','Attendre','#{{vote|attendre}} - ',signature,'Votre commentaire','mw-editbutton-attendre');
addCustomButton('//upload.wikimedia.org/wikipedia/commons/4/4e/Button_fait2.png','Fait','*{{vote|fait}}',signature,'Votre commentaire','mw-editbutton-fait');
addCustomButton('//upload.wikimedia.org/wikipedia/commons/5/5e/Button_non.png','Non','*{{vote|non}} - ',signature,'Votre commentaire','mw-editbutton-non');
//////////////////////FIN DE LA ZONE PERSONNALISABLE//////////////////////
//////////////FIN DU CODE DES BOUTONS-PRESSION POUR DISCUSSIONS ///////////////
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 getWeekNr() {
var today = new Date();
Year = takeYear(today);
Month = today.getMonth();
Day = today.getDate();
now = Date.UTC(Year,Month,Day,0,0,0);
var Firstday = new Date();
Firstday.setYear(Year);
Firstday.setMonth(0);
Firstday.setDate(1);
then = Date.UTC(Year,0,1,0,0,0);
var Compensation = Firstday.getDay();
if (Compensation > 4) Compensation -= 4;
else Compensation += 3;
NumberOfWeek = Math.round((((now-then)/86400000)+Compensation)/7);
return NumberOfWeek;
}
function takeYear(theDate)
{
x = theDate.getYear();
var y = x % 100;
y += (y < 38) ? 2000 : 1900;
return y;
}
function Semaine_courante() {
today = new Date();
year = today.getYear();
if (year < 2000)
year = year + 1900;
return ("semaine " + getWeekNr() + " " + year );
}
function Menu() {
var tDate = TodayDate();
var tSemaine = Semaine_courante();
var a = document.getElementById("p-Contribuer");
if (a) {
b = a.getElementsByTagName("ul");
if (b.length > 0) {
b[0].innerHTML = b[0].innerHTML
+ '<li><span title="Page courante du Bistro">'
+ '<a href="/wiki/Wikipédia:Le Bistro/'+ tDate +'">Bistro du jour</a></span></li>'
}
}
}
//$(Menu);
addOnloadHook(function() {
var semcour = Semaine_courante();
var tDate = TodayDate();
mw.util.addPortletLink('p-Contribuer', '/wiki/Wikipédia:Le Bistro/'+tDate, 'Bistro du jour');
mw.util.addPortletLink('p-Contribuer', '/wiki/Wikipédia:Oracle/'+semcour, 'Oracle de la semaine');
});
//LIVERC
importScript('User:EDUCA33E/LiveRC.js');
});