Utilisateur:HertzZ/monobook.js : Différence entre versions
De Ekopedia
(test) |
(test2) |
||
Ligne 6 : | Ligne 6 : | ||
addOnloadHook(function() { | addOnloadHook(function() { | ||
− | addPortletLink('p-cactions', '/Utilisateur:HertzZ/ | + | addPortletLink('p-cactions', '/Utilisateur:HertzZ/Bac à sable', 'Bac à sable'); |
}); | }); | ||
Ligne 47 : | Ligne 47 : | ||
return parseInt(somme / 7) ; | return parseInt(somme / 7) ; | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } |
Version du 10 mai 2009 à 22:30
function OngletPurge() { addPortletLink('p-cactions', wgScript + '?title=' + wgPageName + '&action=purge', 'purger', 'ca-purge', 'purger le cache de la page', 'p'); if( wgAction == 'purge') addClass(document.getElementById('ca-purge'), 'selected'); } if( wgNamespaceNumber >= 0 && (wgAction == 'view' || wgAction == 'purge') ) addOnloadHook(OngletPurge); addOnloadHook(function() { addPortletLink('p-cactions', '/Utilisateur:HertzZ/Bac à sable', 'Bac à sable'); }); //----------------------------------------------------------- // Onglet Purge obtenir("OngletPurge"); function TodayDate() { m = new Array("janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"); tableau = new Array(31,28,31,30,31,30,31,31,30,31,30,31); today = new Date(); day = today.getDate(); month = today.getMonth(); year = today.getYear() + 1900; if ( today.getHours() >= 12 ) { day ++; if ( day > tableau[month] ) { day = 1; month++; } } return (day + " " + m[month] + " " + year); } function WeekNumber() { tableau = new Array(31,28,31,30,31,30,31,31,30,31,30,31); today = new Date(); month = today.getMonth(); somme = today.getDate() + 10 ; /* 7 + 3 jours manquant à la première semaine de 2009 */ for(i = 0; i < month; i++) somme += tableau[i]; return parseInt(somme / 7) ; }