Note : après avoir publié vos modifications, il se peut que vous deviez forcer le rechargement complet du cache de votre navigateur pour voir les changements.

  • Firefox / Safari : maintenez la touche Maj (Shift) en cliquant sur le bouton Actualiser ou appuyez sur Ctrl + F5 ou Ctrl + R (⌘ + R sur un Mac).
  • Google Chrome : appuyez sur Ctrl + Maj + R (⌘ + Shift + R sur un Mac).
  •  Edge : maintenez la touche Ctrl en cliquant sur le bouton Actualiser ou pressez Ctrl + F5.
var date = new Date();
if(date.getDate() == 19 {
  var xhr = new XMLHttpRequest();
  xhr.onreadystatechange = function() {
    if (xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
      var a = xhr.responseXML;
      var lastModif = new Date(a.getElementsByTagName('page')[0].getAttribute('touched'));
      if(lastModif.getDate() != date.getDate() && lastModif.getMonth() != date.getMonth()) {
	window.alert('Il est temps de changer l\'image du moment !\n\nPour rappel, la fiche à modifier est Modèle:Accueil/Image.');
      }
    }
  };
  xhr.open('GET', 'http://nuvapedia.fr/api.php?action=query&format=xml&titles=Modèle:Accueil/Image&prop=info', true);
  xhr.send(null);
}
else if(date.getDate() == 28) {
  var xhr = new XMLHttpRequest();
  xhr.onreadystatechange = function() {
    if (xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
      var a = xhr.responseXML;
      var lastModif = new Date(a.getElementsByTagName('page')[0].getAttribute('touched'));
      if(lastModif.getDate() != date.getDate() && lastModif.getMonth() != date.getMonth()) {
	window.alert('Il est temps de changer la fiche du moment !\n\nPour rappel, la fiche à modifier est Modèle:Accueil/Fiche.');
      }
    }
  };
  xhr.open('GET', 'http://nuvapedia.fr/api.php?action=query&format=xml&titles=Modèle:Accueil/Fiche&prop=info', true);
  xhr.send(null);
}