Aller au contenu

Utilisateur:Bokken/common.js

Une page de Wikipédia, l'encyclopédie libre.
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.
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+1,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 > 3) 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-navigation");

     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 +'">Page courante du Bistro</a></span></li>'

             }

     }

}

    

$(Menu);


//[[:en:User:Lupin/popups.js]]


document.write('<script type="text/javascript" src="' 

             + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js' 

             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');


importScript('Utilisateur:Stef48/revocation.js');


// TodoRapide ([[Utilisateur:Micthev/TodoRapide]])

//importScript('Utilisateur:Micthev/TodoRapide.js');

//var Todo_emplacement ="À faire";


// Remplacer les émoticonnes par leurs alternatives textuelles

importScript('Utilisateur:Arkanosis/emoticache.js');


//importScript('User:EDUCA33E/LiveRC.js');


//obtenir('OuvrageArticle');


//obtenir('RefJournalArticle');