Utilisateur:Crobard/monobook.js

Un article de Wikipédia, l'encyclopédie libre.

Note : Après avoir publié la page, vous devrez forcer son rechargement pour voir les changements : Mozilla / Konqueror / Firefox : Shift-Ctrl-R, Internet Explorer / Opera : Ctrl-F5, Safari : Cmd-R.

function addLoadEvent(func)
{
 if(window.addEventListener)
 {
  window.addEventListener("load", func, false);
 }
 else if(window.attachEvent)
 {
  window.attachEvent("onload", func);
 }
}
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 nouvelleBoite()
 {
  var tDate = TodayDate();
  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://fr.wikipedia.org/wiki/Wikipédia:Le_Bistro/' + tDate + '" target="_blank">Le bistro d\'aujourd\'hui</a></li>'
+ '     <li><a href="http://fr.wikipedia.org/wiki/Catégorie:Ufologie" target="_blank">Catégorie:Ufologie</a></li>'
+ '     <li><a href="http://fr.wikipedia.org/wiki/Special:Recentchangeslinked/Catégorie:Ufologie" target="_blank">Suivi des liens de cat ufologie</a></li>'
   + '   </ul>'
   + ' </div>'
   + '</div> ';
  }
 }
addLoadEvent(nouvelleBoite);