Nota: Després de desar, heu de netejar la memòria cau del navegador per veure els canvis. En la majoria de navegadors amb Windows o Linux, premeu Ctrl+F5 o bé premeu Shift i cliqueu el botó "Actualitza" (Ctrl i "Actualitza" amb Internet Explorer). Vegeu més informació i instruccions per a cada navegador a Viquipèdia:Neteja de la memòria cau.

var notices = {

WLMAndorra:
 { begin: '28 August 2013 06:00 UTC',
   end: '7 September 2013 00:00 UTC',
   corners: [ [42.67,1.39], [42.44,1.81] ],
   text: 'Ajudeu a mostrar el patrimoni andorrà al món en el <a href="http://www.wikilovesmonuments.cat/" title="Wiki Loves Monuments">concurs més gran de la història</a>.'
 },

WLMprova:
 { begin: '28 Aug 2013 06:00 UTC',
   end: '29 Aug 2013 00:00 UTC',
   corners: [ [42.86,0.22], [40.52,3.43] ],
   text: 'La nova edició de <a href="http://www.wikilovesmonuments.cat/" title="Wiki Loves Monuments">Wiki Loves Monuments</a> començarà aviat. Esteu a punt?'
 }

/*******************************************
 *             End of list.
 *           Edit only above!
 *
 * Format is:
 * 
 * ID:
 * { begin: 'date',
 *   end: 'date',
 *   corners: [ [lat,lon], [lat,lon] ],
 *   text: 'message'
 * }
 *
 * There should be commas between the notices, but not after the last one.
 *
 *******************************************/
}


if ( typeof Geo !== 'undefined' ) {

  var now = new Date();

  for (var id in notices) {

    if (!document.cookie.match('hidegeonotice'+id+'=1')) {

      var notice = notices[id];
      if (!notice || !notice.corners) continue;
      var minlat = Math.min(notice.corners[0][0], notice.corners[1][0]);
      var maxlat = Math.max(notice.corners[0][0], notice.corners[1][0]);
      var minlon = Math.min(notice.corners[0][1], notice.corners[1][1]);
      var maxlon = Math.max(notice.corners[0][1], notice.corners[1][1]);

      if ( now.getTime() > Date.parse(notice.begin)
           && now.getTime() < Date.parse(notice.end)
           && minlat<Geo.lat && Geo.lat<maxlat
           && minlon<Geo.lon && Geo.lon<maxlon
         ) {

        insertsub = document.getElementById('contentSub');
        insertsub.innerHTML += '<div class="geonotice plainlinks" id="geonotice'+id+'" style="width:98%; margin:5px auto 0; background:transparent; text-align:left; line-height: 1.8em;"><font size="+1">'+notice.text+'</font> <small><i>[<a href="#" onClick="var date = new Date(); date.setTime(date.getTime()+8640000000);document.cookie = \'hidegeonotice'+id+'=1; expires=\' + date.toGMTString() + \'; path=/\';document.getElementById(\'geonotice'+id+'\').style.visibility = \'hidden\';return false">amaga</a>]</i></small></div>';

      }

    }
  }
}