For faster navigation, this Iframe is preloading the Wikiwand page for Discussion utilisateur:Dr Brains/GlobalWatchlist.js.

Discussion utilisateur:Dr Brains/GlobalWatchlist.js

//

//

// <pre><nowiki>
  
/////////////////////////////// PARTIE PERSONNALISABLE /////////////////////////////
 
//// Liste des wikis disponibles ////
if(typeof(GlobalWatchlist_WikiList) == 'undefined'){
window.GlobalWatchlist_WikiList = new Array();
GlobalWatchlist_WikiListCount=0;
 
// wikis globaux
GlobalWatchlist_WikiList[GlobalWatchlist_WikiListCount++] = '//www.mediawiki.org';
GlobalWatchlist_WikiList[GlobalWatchlist_WikiListCount++] = '//meta.wikimedia.org';
GlobalWatchlist_WikiList[GlobalWatchlist_WikiListCount++] = '//commons.wikimedia.org';
GlobalWatchlist_WikiList[GlobalWatchlist_WikiListCount++] = '//species.wikimedia.org';
GlobalWatchlist_WikiList[GlobalWatchlist_WikiListCount++] = '//www.wikidata.org';
GlobalWatchlist_WikiList[GlobalWatchlist_WikiListCount++] = '//translatewiki.net';

// wikis multi-langues
var GlobalWatchlist_WikiListLang = new Array();
GlobalWatchlist_WikiListLangCount=0;
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'aa';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ab';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ace';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'af';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ak';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'als';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'am';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'an';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ang';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ar';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'arc';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'arz';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'as';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ast';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'av';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ay';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'az';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ba';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'bar';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'bat-smg';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'bcl';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'be';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'be-x-old';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'bg';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'bh';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'bi';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'bm';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'bn';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'bo';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'bpy';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'br';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'bs';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'bug';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'bxr';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ca';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'cbk-zam';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'cdo';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ce';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ceb';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ch';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'cho';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'chr';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'chy';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ckb';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'co';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'cr';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'crh';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'cs';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'csb';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'cu';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'cv';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'cy';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'cz';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'da';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'de';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'diq';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'dk';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'dsb';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'dv';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'dz';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ee';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'el';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'eml';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'en';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'eo';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'epo';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'es';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'et';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'eu';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ext';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'fa';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ff';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'fi';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'fiu-vro';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'fj';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'fo';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'fr';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'frp';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'fur';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'fy';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ga';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'gan';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'gd';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'gl';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'glk';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'gn';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'got';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'gu';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'gv';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ha';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'hak';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'haw';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'he';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'hi';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'hif';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ho';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'hr';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'hsb';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ht';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'hu';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'hy';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'hz';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ia';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'id';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ie';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ig';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ii';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ik';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ilo';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'io';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'is';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'it';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'iu';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ja';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'jbo';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'jp';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'jv';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ka';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'kaa';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'kab';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'kg';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ki';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'kj';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'kk';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'kl';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'km';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'kn';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ko';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'kr';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ks';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ksh';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ku';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'kv';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'kw';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ky';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'la';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'lad';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'lb';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'lbe';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'lg';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'li';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'lij';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'lmo';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ln';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'lo';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'lt';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'lv';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'map-bms';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'mdf';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'mg';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'mh';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'mhr';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'mi';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'minnan';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'mk';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ml';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'mn';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'mo';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'mr';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ms';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'mt';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'mus';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'mwl';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'my';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'myv';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'mzn';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'na';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'nah';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'nan';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'nap';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'nb';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'nds';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'nds-nl';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ne';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'new';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ng';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'nl';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'nn';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'no';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'nomcom';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'nov';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'nrm';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'nv';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ny';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'oc';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'om';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'or';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'os';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'pa';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'pag';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'pam';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'pap';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'pcd';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'pdc';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'pi';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'pih';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'pl';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'pms';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'pnb';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'pnt';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ps';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'pt';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'qu';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'rm';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'rmy';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'rn';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ro';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'roa-rup';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'roa-tara';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ru';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'rw';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'sa';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'sah';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'sc';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'scn';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'sco';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'sd';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'se';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'sg';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'sh';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'si';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'simple';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'sk';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'sl';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'sm';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'sn';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'so';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'sq';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'sr';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'srn';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ss';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'st';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'stq';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'su';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'sv';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'sw';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'szl';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ta';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'te';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'tet';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'tg';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'th';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ti';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'tk';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'tl';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'tn';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'to';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'tp';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'tpi';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'tr';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ts';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'tt';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'tum';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'tw';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ty';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'udm';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ug';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'uk';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'ur';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'uz';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 've';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'vec';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'vi';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'vls';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'vo';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'wa';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'war';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'wo';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'wuu';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'xal';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'xh';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'yi';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'yo';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'za';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'zea';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'zh';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'zh-cfr';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'zh-classical';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'zh-min-nan';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'zh-yue';
GlobalWatchlist_WikiListLang[GlobalWatchlist_WikiListLangCount++] = 'zu';
 
for(a=0;a<GlobalWatchlist_WikiListLang.length;a++){
      GlobalWatchlist_WikiList[GlobalWatchlist_WikiListCount++] = '//'+GlobalWatchlist_WikiListLang[a]+'.wikipedia.org';
      GlobalWatchlist_WikiList[GlobalWatchlist_WikiListCount++] = '//'+GlobalWatchlist_WikiListLang[a]+'.wikibooks.org';
      GlobalWatchlist_WikiList[GlobalWatchlist_WikiListCount++] = '//'+GlobalWatchlist_WikiListLang[a]+'.wiktionary.org';
      GlobalWatchlist_WikiList[GlobalWatchlist_WikiListCount++] = '//'+GlobalWatchlist_WikiListLang[a]+'.wikinews.org';
      GlobalWatchlist_WikiList[GlobalWatchlist_WikiListCount++] = '//'+GlobalWatchlist_WikiListLang[a]+'.wikiquote.org';
      GlobalWatchlist_WikiList[GlobalWatchlist_WikiListCount++] = '//'+GlobalWatchlist_WikiListLang[a]+'.wikisource.org';
      GlobalWatchlist_WikiList[GlobalWatchlist_WikiListCount++] = '//'+GlobalWatchlist_WikiListLang[a]+'.wikiversity.org';
      GlobalWatchlist_WikiList[GlobalWatchlist_WikiListCount++] = '//'+GlobalWatchlist_WikiListLang[a]+'.wikivoyage.org';
}
} 
 
if(typeof(GlobalWatchlist_Classes) == 'undefined'){
  window.GlobalWatchlist_Classes = new Object();
  GlobalWatchlist_Classes['www.mediawiki.org'] = 'wwwmediawiki';
  GlobalWatchlist_Classes['meta.wikimedia.org'] = 'metawiki';
  GlobalWatchlist_Classes['commons.wikimedia.org'] = 'commons';
  GlobalWatchlist_Classes['species.wikimedia.org'] = 'wikispecies';
  GlobalWatchlist_Classes['www.wikidata.org'] = 'wikidata';
  GlobalWatchlist_Classes['.wikipedia.org'] = 'wikipedia';
  GlobalWatchlist_Classes['.wikibooks.org'] = 'wikibooks';
  GlobalWatchlist_Classes['.wiktionary.org'] = 'wiktionary';
  GlobalWatchlist_Classes['.wikinews.org'] = 'wikinews';
  GlobalWatchlist_Classes['.wikiquote.org'] = 'wikiquote';
  GlobalWatchlist_Classes['.wikisource.org'] = 'wikisource';
  GlobalWatchlist_Classes['.wikiversity.org'] = 'wikiversity';
  GlobalWatchlist_Classes['.wikivoyage.org'] = 'wikivoyage';

}

var GlobalWatchlist_Options = new Array();
var GlobalWatchlist_TimeCorrection = "00:00";

var GlobalWatchlist_Bugs = new Array();

//// Textes des liens ////
if(typeof(GlobalWatchlist_Text) == 'undefined'){
  window.GlobalWatchlist_Text = new Object();

  GlobalWatchlist_Text["Specialpage_Title"] = 'Liste de suivi globale';
  GlobalWatchlist_Text["Specialpage_Desc"] = 'Liste de suivi globale de différents wikis';

  GlobalWatchlist_Text["Specialpage_FormLegend"] = 'Options de la liste de suivi globale';
  GlobalWatchlist_Text["Wikis_Tip"] = 'Il est possible de sélectionner plusieurs wikis en maintenant enfoncée la touche CTRL';
  GlobalWatchlist_Text["Wikis_All"] = 'Liste complète';
  GlobalWatchlist_Text["Wikis_Search"] = 'Rechercher un wiki dans la liste';
  GlobalWatchlist_Text["Wikis_Selected"] = 'Wikis sélectionnés';
  GlobalWatchlist_Text["Wiki_Del"] = '<';
  GlobalWatchlist_Text["Wiki_Del_title"] = 'Supprimer un wiki de la liste';
  GlobalWatchlist_Text["Wiki_Add"] = '>';
  GlobalWatchlist_Text["Wiki_Add_title"] = 'Ajouter un wiki à la liste';
  GlobalWatchlist_Text["OK"] = 'Rafraîchir';
  GlobalWatchlist_Text["OK_title"] = 'Rafraîchir la liste de suivi globale';

  GlobalWatchlist_Text["Hide_bots"] = 'Masquer les robots';
  GlobalWatchlist_Text["Hide_anon"] = 'Masquer les utilisateurs anonymes';
  GlobalWatchlist_Text["Hide_users"] = 'Masquer les utilisateurs enregistrés';
  GlobalWatchlist_Text["Hide_minor"] = 'Masquer les modifications mineures';
  GlobalWatchlist_Text["Hide_self"] = 'Masquer mes modifications';
  GlobalWatchlist_Text["Hide_logs"] = 'Masquer les journaux';
  GlobalWatchlist_Text["Hide_all"] = 'Afficher uniquement les modifications les plus récentes';
  GlobalWatchlist_Text["Show_notif"] = 'Afficher en <b>gras</b> les pages qui ont été modifiées depuis ma dernière visite';
  GlobalWatchlist_Text["Show_grouped"] = 'Grouper les changements par page';

  GlobalWatchlist_Text["ToggleLink_opened_Title"] = 'Masquer ces changements';
  GlobalWatchlist_Text["ToggleLink_closed_Title"] = 'Afficher ces changements';
  GlobalWatchlist_Text["ToggleLink_opened_Text"] = '▼';
  GlobalWatchlist_Text["ToggleLink_closed_Text"] = '►';

  GlobalWatchlist_Text["Timecorrection"] = "Fuseau horaire";

  GlobalWatchlist_Text["Link_pagetalk_title"]    = "Page de discussion de l'article";
  GlobalWatchlist_Text["Link_pagetalk_text"]     = "discuter";
  GlobalWatchlist_Text["Link_diff_title"]        = "Différence entre les versions";
  GlobalWatchlist_Text["Link_diff_text"]         = "diff";
  GlobalWatchlist_Text["Link_log_title"]         = "Journal";
  GlobalWatchlist_Text["Link_log_text"]          = "Journal";
  GlobalWatchlist_Text["Link_hist_title"]        = "Historique de la page";
  GlobalWatchlist_Text["Link_hist_text"]         = "hist";
  GlobalWatchlist_Text["Link_edit_title"]        = "Modifier la page";
  GlobalWatchlist_Text["Link_edit_text"]         = "modifier";
  GlobalWatchlist_Text["Link_unwatch_title"]     = "Ne plus suivre la page";
  GlobalWatchlist_Text["Link_unwatch_text"]      = "ne plus suivre";
  GlobalWatchlist_Text["Link_usertalk_title"]    = "Page de discussion de l'utilisateur";
  GlobalWatchlist_Text["Link_usertalk_text"]     = "discuter";
  GlobalWatchlist_Text["Link_usercontrib_title"] = "Contributions de l'utilisateur";
  GlobalWatchlist_Text["Link_usercontrib_text"]  = "contributions";

  GlobalWatchlist_Text["BugReport_Class"] = '<b><u>Rapport de bug</u></b><br>Contacter $1 avec le message suivant : <pre>Classes problématiques :\n';

  GlobalWatchlist_Text["Tags"] = {
    "minor":'<abbr class="minoredit" title="Cette modification est mineure.">m</abbr>',
    "bot":'<abbr class="botedit" title="Cette modification a été effectuée par un robot.">b</abbr>' /*,
    "patrol":'<abbr class="unpatrolled" title="Cette modification n’a pas été relue.">!</abbr>'
*/
  };


  GlobalWatchlist_Text["MonthNames"] = {
                                          "1":"janvier",
                                          "2":"février",
                                          "3":"mars",
                                          "4":"avril",
                                          "5":"mai",
                                          "6":"juin",
                                          "7":"juillet",
                                          "8":"août",
                                          "9":"septembre",
                                          "10":"octobre",
                                          "11":"novembre",
                                          "12":"décembre"
  };


}

/////////////////////////////// FIN DE LA PARTIE PERSONNALISABLE /////////////////////////////
 
 
// Mise à jour du cookie

function GlobalWatchlist_SetCookie(cookieName, cookieValue) {
        var now = new Date();
        var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365 );
        return jQuery.cookie(cookieName, cookieValue, {expires:nextYear, path:"/"});
}
 
// Interrogation du cookie

function GlobalWatchlist_GetCookie(cookieName) {
        return jQuery.cookie(cookieName);
}

// Ajax
var GlobalWatchlist_ajax = {
  http:function(bundle){ var xmlhttp; try{ xmlhttp = new XMLHttpRequest(); }catch(e){ try{ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); }catch(e){ try{ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }catch(e){ xmlhttp = false; ))}; if(xmlhttp){ xmlhttp.onreadystatechange = function(){ if (xmlhttp.readyState == 4){ GlobalWatchlist_ajax.httpComplete(xmlhttp,bundle);)); xmlhttp.open(bundle.method ? bundle.method : "GET",bundle.url,bundle.async == false ? false : true); if (bundle.headers) { for (var field in bundle.headers){ try{ xmlhttp.setRequestHeader(field,bundle.headers[field]); }catch(err){))}; xmlhttp.send(bundle.data ? bundle.data : null); }; return xmlhttp;},
  httpComplete: function(xmlhttp,bundle){ if(xmlhttp.status == 200 || xmlhttp.status == 302){ if(bundle.onSuccess) bundle.onSuccess(xmlhttp,bundle); }else if(bundle.onFailure){ bundle.onFailure(xmlhttp,bundle); }else{ ))
};


 
// Mise en forme de la page

function GlobalWatchlist_Init(){ 
       GlobalWatchlist_getShowOptions();
       GlobalWatchlist_getTimeOptions();
       $(document.body).addClass("GlobalWatchlist");
       var Title = document.getElementsByTagName('title')[0];
       Title.innerHTML = GlobalWatchlist_Text["Specialpage_Title"];  
       var FirstHeading = document.getElementById("firstHeading"); 
       FirstHeading.innerHTML = GlobalWatchlist_Text["Specialpage_Title"];  
       var Content = document.getElementById("mw-content-text"); 
       while(Content.firstChild){ Content.removeChild(Content.firstChild); } 
       var Options = GlobalWatchlist_GetCookie("GlobalWatchlistOptions");
       if(Options !== null){
              GlobalWatchlist_Options = new Array();
              OptionsSplit = decodeURIComponent(Options).split("SPLIT")
              for(a=0;a<OptionsSplit.length;a++) {
                     if (OptionsSplit[a] != '' && OptionsSplit[a] != 'null') {
                            GlobalWatchlist_Options.push(OptionsSplit[a]);
                     }
              }
       }
       var WikiTime = GlobalWatchlist_GetCookie("GlobalWatchlistTimeCorrection");
       if(WikiTime != null) GlobalWatchlist_TimeCorrection = decodeURIComponent(WikiTime);
       var tip = '&nbsp;<sup><small><abbr title="'+GlobalWatchlist_Text["Wikis_Tip"]+'">(?)</abbr></small></sup>';
       var GlobalWatchlist_Form = '<fieldset><legend>'+GlobalWatchlist_Text["Specialpage_FormLegend"]+'</legend>'
       +'<table align="center" style="background-color:transparent;"><tr><td>'
       + '<ul id="showOptions">'
       +'<li><select id="timecorrection" >';
       for(var a=-23,l=24;a<l;a++){
         var time = (a<0 ? "-" : (a>0 ? "+" : ""))+( (a*a)<100 ? "0"+Math.abs(a) : Math.abs(a))+":00";
         GlobalWatchlist_Form +=''
         + '<option value="'+time+'" '+ ( (time==GlobalWatchlist_TimeCorrection)? 'selected="selected" ' : '' )
         +'>'+time+'</option>';
       }
       GlobalWatchlist_Form +=''
       +'</select>&nbsp;<label for="timecorrection">'+GlobalWatchlist_Text["Timecorrection"]+'</label></li>'
       +'<li><input type="checkbox" id="hideBots" '
       +'value="!bot" '+(GlobalWatchlist_Options.indexOf("!bot")!=-1 ? 'checked="checked" ': '')+'/>'
       +'&nbsp;<label for="hideBots">'+GlobalWatchlist_Text["Hide_bots"]+'</label></li>'
       +'<li><input type="checkbox" id="hideAnon" '
       +'value="!anon" '+(GlobalWatchlist_Options.indexOf("!anon")!=-1 ? 'checked="checked" ': '')+'/>'
       +'&nbsp;<label for="hideAnon">'+GlobalWatchlist_Text["Hide_anon"]+'</label></li>'
       +'<li><input type="checkbox" id="hideRegistred" '
       +'value="anon" '+(GlobalWatchlist_Options.indexOf("anon")!=-1 ? 'checked="checked" ': '')+'/>'
       +'&nbsp;<label for="hideRegistred">'+GlobalWatchlist_Text["Hide_users"]+'</label></li>'
       +'<li><input type="checkbox" id="hideMinor" '
       +'value="!minor" '+(GlobalWatchlist_Options.indexOf("!minor")!=-1 ? 'checked="checked" ': '')+'/>'
       +'&nbsp;<label for="hideMinor">'+GlobalWatchlist_Text["Hide_minor"]+'</label></li>'
       +'<li><input type="checkbox" id="hideMyself" '
       +'value="!self" '+(GlobalWatchlist_Options.indexOf("!self")!=-1 ? 'checked="checked" ': '')+'/>'
       +'&nbsp;<label for="hideMyself">'+GlobalWatchlist_Text["Hide_self"]+'</label></li>'
       +'<li><input type="checkbox" id="hideLogs" '
       +'value="!log" '+(GlobalWatchlist_Options.indexOf("!log")!=-1 ? 'checked="checked" ': '')+'/>'
       +'&nbsp;<label for="hideLogs">'+GlobalWatchlist_Text["Hide_logs"]+'</label></li>'
       +'<li><input type="checkbox" id="hideAll" '
       +'value="!all" '+(GlobalWatchlist_Options.indexOf("!all")!=-1 ? 'checked="checked" ': '')+'/>'
       +'&nbsp;<label for="hideAll">'+GlobalWatchlist_Text["Hide_all"]+'</label></li>'
       +'<li><input type="checkbox" id="showGrouped" '
       +'value="grouped" '+(GlobalWatchlist_Options.indexOf("grouped")!=-1 ? 'checked="checked" ': '')+'/>'
       +'&nbsp;<label for="showGrouped">'+GlobalWatchlist_Text["Show_grouped"]+'</label></li>'
       +'<li><input type="checkbox" id="showNotif" onclick="GlobalWatchlist_checkNotifShow()" '
       +'value="notif" '+(GlobalWatchlist_Options.indexOf("notif")!=-1 ? 'checked="checked" ': '')+'/>'
       +'&nbsp;<label for="showNotif">'+GlobalWatchlist_Text["Show_notif"]+'</label></li>'
       +'</ul>'
       +'</td><td width="3%">'
       +'</td><td>'
       +'<center><span style="margin:0.3em;"><b>'+GlobalWatchlist_Text["Wikis_All"]+tip+'</b></span></center>'
       +'<center><input type="text" id="searchwiki" size="28" style="padding-top:0;padding-bottom:0;" '
       + 'onkeyup="GlobalWatchlist_Search();" title="'+GlobalWatchlist_Text["Wikis_Search"]+'"/></center>';
       GlobalWatchlist_Form +=''
       +'<select id="ListWiki" name="ListWiki" align="top" size="12" multiple="multiple">';
       GlobalWatchlist_WikiList.sort();
       for (i=0; i<GlobalWatchlist_WikiList.length; i++) {
              GlobalWatchlist_Form += '<option value="'+GlobalWatchlist_WikiList[i]+'">'+GlobalWatchlist_WikiList[i].split("//").join("")+'</option>'
       }
       GlobalWatchlist_Form +='</select>'
       +'</td><td>'
       +'<center><input type="button" name="Wiki_Del" '
       +'value="'+GlobalWatchlist_Text["Wiki_Del"]+'" '
       +'title="'+GlobalWatchlist_Text["Wiki_Del_title"]+'" '
       +'onclick="GlobalWatchlist_SupprWiki();" onselect="GlobalWatchlist_SupprWiki();" />'
       +'<input type="button" name="Wiki_Add" '
       +'value="'+GlobalWatchlist_Text["Wiki_Add"]+'" '
       +'title="'+GlobalWatchlist_Text["Wiki_Add_title"]+'" '
       +'onclick="GlobalWatchlist_AddWiki();" onselect="GlobalWatchlist_AddWiki();" /></center>'
       +'<center><input type="button" name="OK" '
       +'value="'+GlobalWatchlist_Text["OK"]+'" '
       +'title="'+GlobalWatchlist_Text["OK_title"]+'" '
       +'style="padding:0;" '
       +'onclick="GlobalWatchlist_Init();" onselect="GlobalWatchlist_Init();" /></center>'
       +'</td><td><center><span style="margin:0.3em;"><b>'+GlobalWatchlist_Text["Wikis_Selected"]+tip+'</b></span></center>'
       +'<select id="WatchWiki" name="WatchWiki" align="top" size="13" multiple="multiple">'; 
       var WikiList = GlobalWatchlist_GetCookie("GlobalWatchlist");
       if(WikiList != null){
              var GlobalWatchlist_WikiSuivis = new Array();
              WikiListSplit = WikiList.split("SPLIT")
              for (a=0;a<WikiListSplit.length;a++) {
                     if (WikiListSplit[a] != '' && WikiListSplit[a] != 'null') {
                            GlobalWatchlist_WikiSuivis.push (WikiListSplit[a]);
                     }
              }
       }else{
              var GlobalWatchlist_WikiSuivis = new Array();
              GlobalWatchlist_WikiSuivis.push(mw.config.get('wgServer'));
       }
       for(a=0;a<GlobalWatchlist_WikiSuivis.length;a++){
              GlobalWatchlist_Form += '<option value="'+GlobalWatchlist_WikiSuivis[a]+'" style="color:red;">'+GlobalWatchlist_WikiSuivis[a].split("//").join("")+'</option>';
       }
       GlobalWatchlist_Form += '</select>'
       + '</td></tr><tr></table>'
       + '<div id="GlobalWatchlist_bugreport" style="display:none;"></div></fieldset><div id="GlobalWatchlist_edits"></div>'; 
       Content.innerHTML += GlobalWatchlist_Form;
       GlobalWatchlist_checkNotifShow();
       GlobalWatchlist_Launch();       
}

function GlobalWatchlist_deleteNotShowOptions(Text){
  var unwantedoptions = ["!self","!all","!log", "notif", "grouped"];
  for(var a=0,l=unwantedoptions.length;a<l;a++){ Text = Text.split(unwantedoptions[a]).join(""); }
  Text = Text.split("||").join("");
  return Text;
}

function GlobalWatchlist_checkNotifShow(){
  var notifInput = document.getElementById("showNotif");
  if(notifInput.checked) $(document.body).addClass("mw-special-GlobalWatchlist");
  else $(document.body).removeClass("mw-special-GlobalWatchlist");
}


// Affiche un lien vers la liste de suivi globale dans les outils personnels

function GlobalWatchlist_Link(){
        var LienWatchlist = document.getElementById('pt-watchlist');
        if(LienWatchlist!=null){
                var LienGlobalWatchlist = document.createElement('li');
                LienGlobalWatchlist.id = 'pt-Gwatchlist';
                if((mw.config.get('wgCanonicalSpecialPageName')=="Blankpage")&&(mw.config.get('wgTitle').split("/")[1]==="GlobalWatchlist"))
                  LienGlobalWatchlist.className = "active";
                LienGlobalWatchlist.innerHTML = '<a href="'+mw.config.get('wgArticlePath').split("$1").join("Special:Blankpage/GlobalWatchlist")+'" title="'+GlobalWatchlist_Text["Specialpage_Desc"]+'" >'+GlobalWatchlist_Text["Specialpage_Title"]+'</a>';
                LienWatchlist.parentNode.insertBefore(LienGlobalWatchlist,LienWatchlist);
        }else if(mw.config.get('skin')=="cologneblue"){
                var LienWatchlist = document.getElementById('topbar').getElementsByTagName('a')[6];
                var Separator = document.createTextNode(' | ');
                var LienGlobalWatchlist = document.createElement('a');
                if((mw.config.get('wgCanonicalSpecialPageName')=="Blankpage")&&(mw.config.get('wgTitle').split("/")[1]==="GlobalWatchlist"))
                  LienGlobalWatchlist.className = "active";
                LienGlobalWatchlist.href = mw.config.get('wgArticlePath').split("$1").join("Special:Blankpage/GlobalWatchlist");
                LienGlobalWatchlist.innerHTML = GlobalWatchlist_Text["Specialpage_Title"];
                LienGlobalWatchlist.title = GlobalWatchlist_Text["Specialpage_Desc"];
                LienWatchlist.parentNode.insertBefore(Separator,LienWatchlist);
                LienWatchlist.parentNode.insertBefore(LienGlobalWatchlist,Separator);   
        }
}
 
// Ajoute un wiki à la liste de suivi

function GlobalWatchlist_AddWiki(){
        var ListeCompleteSelect = document.getElementById('ListWiki');
        var ListeWikisSelect = document.getElementById('WatchWiki');
        var ListeComplete = ListeCompleteSelect.getElementsByTagName('option');
        var ListeWikis = ListeWikisSelect.getElementsByTagName('option');
        var AncienneListe = new Array();
        var NouvelleListe = new Array();
        for(a=0;a<ListeWikis.length;a++){
                var WikiName = ListeWikis[a].value;
                AncienneListe.push(WikiName);
                NouvelleListe.push(WikiName);
        }
        for(var a=0;a<ListeComplete.length;a++){
                if(!ListeComplete[a].selected) continue;
                var WikiSelectedName = ListeComplete[a].value;
                if(NouvelleListe.indexOf(WikiSelectedName)==-1) NouvelleListe.push(WikiSelectedName);
                ListeComplete[a].selected = false;
        }
        var CookieValue = '';
        for(var b=0;b<NouvelleListe.length;b++){
                var NewWiki = NouvelleListe[b];
                CookieValue += NewWiki + 'SPLIT';
                if(AncienneListe.indexOf(NewWiki)==-1){
                        var opt = document.createElement('option');
                        opt.value = NewWiki;
                        opt.innerHTML = NewWiki.split("//").join("");
                        opt.style.color = "red";
                        ListeWikisSelect.appendChild(opt);
                }
        }
        GlobalWatchlist_SetCookie('GlobalWatchlist',CookieValue);
}
 
// Supprime un wiki de la liste de suivi

function GlobalWatchlist_SupprWiki(){
        var ListeWikisSelect = document.getElementById('WatchWiki');
        var ListeWikis = ListeWikisSelect.getElementsByTagName('option');
        var NouvelleListe = new Array();
        var CookieValue = '';
        for(a=0;a<ListeWikis.length;a++){
                var opt = ListeWikis[a];
                if(!opt) continue;
                if(opt.selected){
                        opt.parentNode.removeChild(opt);
                        a--
                }else{
                        var WikiName = opt.value;
                        NouvelleListe.push(WikiName);
                        CookieValue += WikiName + 'SPLIT';
                }
        }
        GlobalWatchlist_SetCookie('GlobalWatchlist',CookieValue);
} 

function GlobalWatchlist_Search(){
  var searchwiki = document.getElementById("searchwiki");
  var Select = document.getElementById("ListWiki");
  if(!searchwiki || !Select) return;
  var text = "//"+searchwiki.value;
  if(text === "//") return;
  var Options = Select.getElementsByTagName('option');
  for(var a=0,l=Options.length;a<l;a++){
    var opt = Options[a];
    if(opt.value.indexOf(text)==0){
      GlobalWatchlist_ScrollToOption(Options[(l-1)]);
      GlobalWatchlist_ScrollToOption(opt);
      return;
    }
  }
}

function GlobalWatchlist_ScrollToOption(opt){
  if(!opt) return;
  var isSelected = (opt.selected ? "selected" : false);
  opt.selected = false;
  opt.selected = "selected";
  opt.selected = isSelected;
}

function GlobalWatchlist_Launch(){
  var Target = document.getElementById("GlobalWatchlist_edits");
  var Select = document.getElementById("WatchWiki");
  if(!Target || !Select) return;
  while(Target.firstChild){ Target.removeChild(Target.firstChild); };
  if(GlobalWatchlist_Options.indexOf("!bot")!=-1) $(Target).addClass("nobots");
  else $(Target).removeClass("nobots");
  if(GlobalWatchlist_Options.indexOf("!minor")!=-1) $(Target).addClass("nominors");
  else  $(Target).removeClass("nominors");
  var Options = Select.getElementsByTagName('option');
  if(Options.length===0) return;
  var Servers = new Array();
  for(var a=0,l=Options.length;a<l;a++){
    var Option = Options[a];
    Option.style.color = "red";
    Servers.push(Option.value);
  }
  GlobalWatchlist_Request(Servers, 0);
}

function GlobalWatchlist_getShowOptions(){
  var ShowOptions = document.getElementById("showOptions");
  if(!ShowOptions) return;
  GlobalWatchlist_Options = new Array();
  var opts = ShowOptions.getElementsByTagName('input');
  for(var a=0,l=opts.length;a<l;a++){
    var opt = opts[a];
    if(opt.type != "checkbox") continue;
    var thisopt = opt.value;
    if(opt.checked){
      GlobalWatchlist_Options.push(thisopt);
    }
  }
  GlobalWatchlist_SetCookie('GlobalWatchlistOptions', GlobalWatchlist_Options.join("SPLIT"));
}

function GlobalWatchlist_getTimeOptions(){
  var Select = document.getElementById("timecorrection");
  if(!Select) return;
  var Time = Select.value;
  GlobalWatchlist_TimeCorrection = Time;
  GlobalWatchlist_SetCookie('GlobalWatchlistTimeCorrection', GlobalWatchlist_TimeCorrection);
}

var GlobalWatchlist_StandardURL = ''
  + '/w/api.php?format=xml&action=query&list=watchlist'
  + '&wllimit=499'
  + '&wlprop=ids|title|flags|user|userid|comment|parsedcomment|timestamp|sizes|notificationtimestamp|loginfo'
  + '&wltype=new|edit'; // |external

function GlobalWatchlist_Request(Servers, position){
  var Server = Servers[position];
  if(!Server){
    if(GlobalWatchlist_Options.indexOf("grouped")!=-1) GlobalWatchlist_GroupEdits();
    return;
  }
  if(Server == mw.config.get('wgServer')){
    var URL = Server + GlobalWatchlist_StandardURL;
    if(GlobalWatchlist_Options.indexOf("!log")==-1) URL += '|log';
    if(GlobalWatchlist_Options.indexOf("!all")==-1) URL += '&wlallrev';
    if(GlobalWatchlist_Options.indexOf("!self")!=-1) URL += '&wlexcludeuser=' + encodeURIComponent(mw.config.get('wgUserName'));
    var otherShowOptions = GlobalWatchlist_deleteNotShowOptions(GlobalWatchlist_Options.join("|"));
    if(otherShowOptions != "") URL += '&wlshow=' + otherShowOptions;
    GlobalWatchlist_ajax.http({
          url: URL,
          servers:Servers,
          serverpos: position,
          onSuccess:GlobalWatchlist_FillEditsDiv,
          onFailure:GlobalWatchlist_FillEditsDiv
    });
  }else{
    var URL = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php?format=xml&action=centralauthtoken';
    GlobalWatchlist_ajax.http({
          url: URL,
          servers:Servers,
          serverpos: position,
          onSuccess:GlobalWatchlist_ManageCentralAuthToken,
          onFailure:GlobalWatchlist_ManageCentralAuthToken
    });
  }
}

function GlobalWatchlist_ManageCentralAuthToken(Req, data){
  var centralauthtoken = false;
  try{
    var XML = Req.responseXML;
    var Tokens = XML.getElementsByTagName('centralauthtoken')[0];
    centralauthtoken = Tokens.getAttribute('centralauthtoken');
  }catch(e){ }
  if(!centralauthtoken) return GlobalWatchlist_Request(data.servers, (data.serverpos+1));;
  var Server = data.servers[data.serverpos];
  var URL = Server + GlobalWatchlist_StandardURL
  if(GlobalWatchlist_Options.indexOf("!log")==-1) URL += '|log';
  if(GlobalWatchlist_Options.indexOf("!all")==-1) URL += '&wlallrev';
  if(GlobalWatchlist_Options.indexOf("!self")!=-1) URL += '&wlexcludeuser=' + encodeURIComponent(mw.config.get('wgUserName'));
  var otherShowOptions = GlobalWatchlist_deleteNotShowOptions(GlobalWatchlist_Options.join("|"));
  if(otherShowOptions!="") URL += '&wlshow=' + otherShowOptions;
  URL += '&origin='+encodeURIComponent(window.location.protocol+mw.config.get('wgServer'))
       + '&centralauthtoken='+encodeURIComponent(centralauthtoken);
  GlobalWatchlist_ajax.http({
          url: URL,
          servers:data.servers,
          serverpos: data.serverpos,
          onSuccess:GlobalWatchlist_FillEditsDiv,
          onFailure:GlobalWatchlist_FillEditsDiv
  });
}

function GlobalWatchlist_FillEditsDiv(Req, data){
  var Target = document.getElementById("GlobalWatchlist_edits");
  var Select = document.getElementById("WatchWiki");
  if(!Target || !Select) return;
  var XML = Req.responseXML;
  if(!XML){
    GlobalWatchlist_Request(data.servers, (data.serverpos+1));
    return;
  }
  var api = XML.getElementsByTagName('api')[0];
  if(!api || api.firstChild.nodeName == "error"){
    GlobalWatchlist_Request(data.servers, (data.serverpos+1));
    return;
  }
  var query = api.getElementsByTagName('query')[0];
  if(!query){
    GlobalWatchlist_Request(data.servers, (data.serverpos+1));
    return;
  }
  var Server = data.servers[data.serverpos];
  var items = api.getElementsByTagName('item');
  for(var a=0,l=items.length;a<l;a++){
    var item = items[a];
    var watchtimestamp = GlobalWatchlist_FillEditsDiv_ManageTimestamp(item.getAttribute('timestamp'));
    var watchpage = item.getAttribute('title');
    var bot = (item.getAttribute('bot')==="");
    var minor = (item.getAttribute('minor')==="");
    var patrolled = (item.getAttribute('patrolled')==="");
    var watchtype = item.getAttribute('type');
    var watchlogtype = item.getAttribute('logtype');
    var watchaction = item.getAttribute('logaction');
    var notificationtimestamp = item.getAttribute('notificationtimestamp');
    var date = parseInt(watchtimestamp.split("T")[0].split("-").join(""));
    var oldUL = document.getElementById(date);
    if(!oldUL){
      var uladded = false;
      oldUL = document.createElement('ul');
      oldUL.id = date;
      oldUL.className = "special";
      var AllUl = Target.getElementsByTagName('ul');
      if(AllUl.length===0){
        uladded = true;
        Target.appendChild(oldUL);
      }else{
        for(var u=0,ulen=AllUl.length;u<ulen;u++){
          if(uladded) continue;
          var ul = AllUl[u];
          var ulid = parseInt(ul.id);
          if(ulid < date){
            ul.parentNode.insertBefore(oldUL, ul.previousSibling);
            uladded = true;
          }
        }
      }
      if(!uladded) Target.appendChild(oldUL);
      var DateLi = document.createElement("h4");
      DateLi.className = "DateLi";
      oldUL.parentNode.insertBefore(DateLi, oldUL);
      var FormattedDate = watchtimestamp.split("T")[0].split("-");
      FormattedDate = parseInt(FormattedDate[2]) + " " + GlobalWatchlist_Text["MonthNames"][parseInt(FormattedDate[1])] + " " + FormattedDate[0];
      DateLi.innerHTML = FormattedDate;
    }
    var NotifyText = GlobalWatchlist_FillEditsDiv_CreateLiContent(item, Server);
    var LiTs = parseInt(watchtimestamp.split("T").join("").split("Z").join("").split("-").join("").split(":").join(""));
    var Li = document.createElement('li');
    Li.id = LiTs;
    Li.title = Server;
    for(var servername in GlobalWatchlist_Classes){
        if(Server.indexOf(servername)!=-1) Li.className = GlobalWatchlist_Classes[servername];
    }
    $(Li).addClass("GWLpage-"+GlobalWatchlist_FillEditsDiv_SanitizeClass(Server+"-_-"+watchpage));
    if(watchtype === "log"){
       $(Li).addClass("mw-changeslist-line-log");
       $(Li).addClass("mw-changeslist-line-"+watchlogtype);
       $(Li).addClass("mw-changeslist-line-"+watchlogtype+"-"+watchaction);
    }
    if(notificationtimestamp==="") $(Li).addClass("mw-changeslist-line-not-watched");
    else $(Li).addClass("mw-changeslist-line-watched");
    if(bot) $(Li).addClass("bot");
    if(minor) $(Li).addClass("minor"); 
    if(patrolled) $(Li).addClass("patrolled");
    Li.innerHTML = NotifyText;
    var addedli = false;
    var alllis = oldUL.getElementsByTagName('li');
    if(alllis.length===0){
      oldUL.appendChild(Li);
      addedli = true;
    }else{
      for(var u=0,ulen=alllis.length;u<ulen;u++){
        if(addedli) continue;
        var li = alllis[u];
        var liid = parseInt(li.id);
        if(liid < LiTs){
          li.parentNode.insertBefore(Li, li);
          addedli = true;
        }
      }
    }
    if(!addedli) oldUL.appendChild(Li);
    GlobalWatchlist_FillEditsDiv_ManageLiContent(Li, Server);
  }
  var Options = Select.getElementsByTagName('option');
  for(var a=0,l=Options.length;a<l;a++){
    var Option = Options[a];
    if(Option.value != Server) continue;
    Option.style.color = "green";
  }  
  GlobalWatchlist_Request(data.servers, (data.serverpos+1));
}

function GlobalWatchlist_FillEditsDiv_SanitizeClass(ClassName){
  ClassName = ClassName.replace(/[\/ "'’`,;:~!%#&^\*\+\\\(\)\[\]\{\}\.\$\?]/g, "_");
//  ClassName = ClassName.replace(/[\/ "'’,;:~!%#&^\*\+\\\(\)\[\]\{\}\.\$\?]/g, "_"); // For tests
  return ClassName;
}

function GlobalWatchlist_FillEditsDiv_CreateLiContent(item, Server){
    var watchtimestamp = GlobalWatchlist_FillEditsDiv_ManageTimestamp(item.getAttribute('timestamp'));
    var watchtype = item.getAttribute('type');
    var watchlogtype = item.getAttribute('logtype');
    var watchaction = item.getAttribute('logaction');
    var watchpageid = item.getAttribute('pageid');
    var watcholdrevid = item.getAttribute('old_revid');
    var watchrevid = item.getAttribute('revid');
    var watchpage = item.getAttribute('title');
    var watchuser = item.getAttribute('user');
    var watchsum = item.getAttribute('parsedcomment');
    var oldlen = parseInt(item.getAttribute('oldlen'));
    var newlen = parseInt(item.getAttribute('newlen'));
    var codedpage = encodeURIComponent(watchpage);
    var codeduser = encodeURIComponent(watchuser);
    var Time = watchtimestamp.split("T")[1].split("Z").join("");
    var Type = (Server == mw.config.get('wgServer') ? 'target="_blank" ' : 'class="extiw" target="_blank" ' );
    var PageLink = '<a '+Type+'href="'+Server+mw.config.get('wgScript')+'?title='+codedpage+'" '
                 + 'title="'+watchpage+'">'+watchpage+'</a>';

    var DiffLink = "";
    if(watchtype=="new"){
      DiffLink = GlobalWatchlist_Text["Link_diff_text"];
    }else if(watchtype=="edit"){
      DiffLink = '<a '+Type+'href="'+Server+mw.config.get('wgScript')+'?title='+codedpage+'&diff='+watchrevid+'&oldid='+watcholdrevid+'" '
                 + 'title="'+GlobalWatchlist_Text["Link_diff_title"]+'">'+GlobalWatchlist_Text["Link_diff_text"]+'</a>';
    }else if(watchtype=="log"){
      DiffLink = '<a '+Type+'href="'+Server+mw.config.get('wgScript')+'?title=Special:Log&type='+watchlogtype+'&page='+codedpage+'&user='+codeduser+'" '
                 + 'title="'+GlobalWatchlist_Text["Link_log_title"]+' '+watchtype+'">'+GlobalWatchlist_Text["Link_log_text"]+' '+watchlogtype+'/'+watchaction+'</a>';
    }
    var HistLink = '<a '+Type+'href="'+Server+mw.config.get('wgScript')+'?title='+codedpage+'&action=history" '
                 + 'title="'+GlobalWatchlist_Text["Link_hist_title"]+'">'+GlobalWatchlist_Text["Link_hist_text"]+'</a>';
    var EditLink = '<a '+Type+'href="'+Server+mw.config.get('wgScript')+'?title='+codedpage+'&action=edit" '
                 + 'title="'+GlobalWatchlist_Text["Link_edit_title"]+'">'+GlobalWatchlist_Text["Link_edit_text"]+'</a>';
    var StopLink = '<a '+Type+'href="'+Server+mw.config.get('wgScript')+'?title='+codedpage+'&action=unwatch" '
                 + 'title="'+GlobalWatchlist_Text["Link_unwatch_title"]+'">'+GlobalWatchlist_Text["Link_unwatch_text"]+'</a>';
    var UserLink = '<a '+Type+'href="'+Server+mw.config.get('wgArticlePath').split('$1').join('User:'+codeduser)+'" '
                 + 'title="User:'+watchuser+'">'+watchuser+'</a>';
    var UserTalkLink = '<a '+Type+'href="'+Server+mw.config.get('wgArticlePath').split('$1').join('User talk:'+codeduser)+'" '
                 + 'title="'+GlobalWatchlist_Text["Link_usertalk_title"]+'">'+GlobalWatchlist_Text["Link_usertalk_text"]+'</a>';
    var UserContribLink = '<a '+Type+'href="'+Server + mw.config.get('wgArticlePath').split('$1').join('Special:Contributions/'+codeduser)+'" '
                 + 'title="'+GlobalWatchlist_Text["Link_usercontrib_title"]+'">'+GlobalWatchlist_Text["Link_usercontrib_text"]+'</a>';
    var sizespan = "";
    var loginfos = "";
    if(watchtype!="log"){    
        var diffsize = (newlen-oldlen);
        var sizeclass = "mw-plusminus-null";
        if(diffsize<0) sizeclass = "mw-plusminus-neg";
        if(diffsize>0) sizeclass = "mw-plusminus-pos";
        sizespan = '<span class="mw-sizespan '+sizeclass+'">'+((diffsize*diffsize>250000)?'<b>('+diffsize+')</b>':'('+diffsize+')' )+'</span>';
    }else{
        loginfos = GlobalWatchlist_FillEditsDiv_getItemLogIfos(item, Server);
    }
    var tags = "";
    for(var tag in GlobalWatchlist_Text["Tags"]){
      tags += GlobalWatchlist_Text["Tags"][tag];
    }
    var NotifyText = '$00 <span class="mw-changeslist-date" title="$01">$02</span> (<span class="mw-difflink">$04</span>|$05|$06|$07) <span class="mw-changeslist-separator">. .</span> <span class="mw-title">$03</span> <span class="mw-changeslist-separator">. .</span> $12 <span class="mw-changeslist-separator">. .</span> <span class="mw-user">$08</span> <span class="mw-usertoollinks">($09|$10)</span> <span class="comment">($11)</span>';
    if(watchtype=="log"){
        NotifyText = '$00 <span class="mw-changeslist-date" title="$01">$02</span> (<span class="mw-difflink">$04</span>) <span class="mw-changeslist-separator">. .</span> <span class="mw-title">$03</span> <span class="mw-changeslist-separator">. .</span> <span class="mw-user">$08</span> <span class="mw-usertoollinks">($09|$10)</span> $13 <span class="comment">($11)</span>';
    }
    NotifyText = NotifyText.split('$00').join(tags);
    NotifyText = NotifyText.split('$01').join(Server);
    NotifyText = NotifyText.split('$02').join(Time);
    NotifyText = NotifyText.split('$03').join(PageLink);
    NotifyText = NotifyText.split('$04').join(DiffLink);
    NotifyText = NotifyText.split('$05').join(HistLink);
    NotifyText = NotifyText.split('$06').join(EditLink);
    NotifyText = NotifyText.split('$07').join(StopLink);
    NotifyText = NotifyText.split('$08').join(UserLink);
    NotifyText = NotifyText.split('$09').join(UserTalkLink);
    NotifyText = NotifyText.split('$10').join(UserContribLink); 
    NotifyText = NotifyText.split('$11').join(watchsum);
    NotifyText = NotifyText.split('$12').join(sizespan);
    NotifyText = NotifyText.split('$13').join(loginfos);
    return NotifyText;
}

function GlobalWatchlist_FillEditsDiv_getItemLogIfos(item, Server){
  var loginfos = "";
  var watchlogtype = item.getAttribute('logtype');
  var watchaction = item.getAttribute('logaction');
  var Type = (Server == mw.config.get('wgServer') ? 'target="_blank" ' : 'class="extiw" target="_blank" ' );
  switch (watchlogtype) {
      case 'protect': 
        try{ loginfos = item.firstChild.firstChild.nodeValue; }catch(e){ }
        break;
      case 'move': 
        try{ 
        var newtitle = item.firstChild.getAttribute("new_title");
        if(!newtitle) newtitle = item.firstChild.getAttribute("target_title");
        loginfos = "→‎"+'<a '+Type+'href="'+Server+mw.config.get('wgScript')+'?title='+encodeURIComponent(newtitle)+'" '
                 + 'title="'+newtitle+'">'+newtitle+'</a>';
        }catch(e){ }
        break;
      case 'block':
        try{ 
        var itemFSAttr = item.firstChild.attributes;
        for(var a=0,l=itemFSAttr.length;a<l;a++){
          var attrname = itemFSAttr[a].name;
          var attrvalue = itemFSAttr[a].value;
          loginfos = (loginfos=="" ? "" : "|" ) + attrname + "="+(attrname=="expiry" ? GlobalWatchlist_FillEditsDiv_ManageTimestamp(attrvalue) : attrvalue);
        }
        }catch(e){ }
        break;
  }
  return "["+loginfos+"]";
}

function GlobalWatchlist_FillEditsDiv_ManageTimestamp(ts){
    var Correction = parseInt(GlobalWatchlist_TimeCorrection.split(":")[0]);
    var TS = ts.replace(/\D/g, "|").split("|");
    var year = parseInt(TS[0]);
    var month = (parseInt(TS[1])-1);
    var day = parseInt(TS[2]);
    var hours = parseInt(TS[3]);
    var minutes = parseInt(TS[4]);
    var seconds = parseInt(TS[5]);    
    var TSDate = (new Date(year, month, day, hours, minutes, seconds)).getTime();
    var CorrectedTSDate = TSDate+(Correction*1000*60*60);
    var RD = new Date();
    RD.setTime(CorrectedTSDate);
    function AddZ(txt){ return ((parseInt(txt)<10)?"0"+txt:txt); }
    var RDS = {
      "y":RD.getFullYear(),
      "M":AddZ(RD.getMonth()+1),
      "d":AddZ(RD.getDate()),
      "h":AddZ(RD.getHours()),
      "m":AddZ(RD.getMinutes()),
      "s":AddZ(RD.getSeconds())
    }
    var correctedts = RDS["y"]+"-"+RDS["M"]+"-"+RDS["d"]+"T"+RDS["h"]+":"+RDS["m"]+":"+RDS["s"]+"Z";
    return correctedts;
}

function GlobalWatchlist_FillEditsDiv_ManageLiContent(Li, Server){
    if(Server == mw.config.get('wgServer')) return;
    var Links =  $.makeArray( $(Li).find('span.comment a') );
    for(var a=0,l=Links.length;a<l;a++){
        var Link = Links[a];
        if(!$(Link).hasClass("extiw")){
            Link.href = Server + Link.href.split(window.location.protocol+mw.config.get('wgServer')).join("").split(mw.config.get('wgServer')).join("");
            $(Link).addClass("extiw");
        }
        Link.target = "_blank";
    }
}

function GlobalWatchlist_GroupEdits(){
    GlobalWatchlist_Bugs = new Array();
    var Div = document.getElementById("GlobalWatchlist_edits");
    if(!Div) return;
    var Uls = $.makeArray( $(Div).find('ul.special') );
    for(var a=0,l=Uls.length;a<l;a++){
        GlobalWatchlist_GroupULEdits(Uls[a]);
    }
    GlobalWatchlist_GroupEdits_ReportBugs();
}
 
function GlobalWatchlist_GroupULEdits(UL){
    var Li = UL.firstChild;
    while(Li){
        var infos = "";
        var Classes = Li.className.split(" ");
        for(var a=0,l=Classes.length;a<l;a++){
            var ThisClass = Classes[a];
            if(ThisClass.indexOf("GWLpage-")===0) infos = ThisClass;
        }
        if(infos!==""){
            try{
                var AllLis = $.makeArray( $(UL).find('li.'+infos) );
                if(AllLis.length>1){
                    var NewLi = document.createElement("li");
                    Li.parentNode.insertBefore(NewLi, Li);
                    var NewUL = document.createElement("ul");
                    NewLi.appendChild(NewUL);
                    for(var a=0,l=AllLis.length;a<l;a++){
                        var thisli = AllLis[a];
                        thisli.parentNode.removeChild(thisli);
                        NewUL.appendChild(thisli);
                    }
                    GlobalWatchlist_GroupULEdits_EditLiContent(NewLi);
                    Li = NewLi;
                }
            }catch(e){
                if(GlobalWatchlist_Bugs.indexOf(infos)==-1) GlobalWatchlist_Bugs.push(infos);
            }
        }
        Li = Li.nextSibling;
        if(!Li) break;
    }
    var ToggleLinks = $.makeArray( $(UL).find('a.GlobalWatchlist-toggleLink') );
    for(var a=0,l=ToggleLinks.length;a<l;a++){ GlobalWatchlist_ToggleEdits(ToggleLinks[a]); }
}

function GlobalWatchlist_GroupEdits_ReportBugs(){
    var BugDiv = document.getElementById("GlobalWatchlist_bugreport");
    var BugLength = GlobalWatchlist_Bugs.length;
    if(BugLength===0){
        BugDiv.innerHTML = "";
        BugDiv.style.display = "none";
        return;
    }
    var DevLink = '<a href="//fr.wikipedia.org/wiki/Discussion_utilisateur:Dr_Brains">Dr Brains</a>';
    var Text = GlobalWatchlist_Text["BugReport_Class"].split("$1").join(DevLink);
    for(var a=0,l=BugLength;a<l;a++){
        Text += '* '+GlobalWatchlist_Bugs[a] + '\n';
    }
    Text += '</pre>';
    BugDiv.innerHTML = Text;
    BugDiv.style.display = "";
}

function GlobalWatchlist_GroupULEdits_EditLiContent(NewLi){
    var Lis = $.makeArray( $(NewLi).find('li'));
    var FirstOldLi = Lis[0];
    var Title = $.makeArray( $(FirstOldLi).find('span.mw-title a'))[0].innerHTML;
    var Server = FirstOldLi.title;
    var Type = (Server == mw.config.get('wgServer') ? 'target="_blank" ' : 'class="extiw" target="_blank" ' );
    var Time = $.makeArray( $(FirstOldLi).find('span.mw-changeslist-date'))[0].innerHTML;
    var PageLink = '<a '+Type+'href="'+Server+mw.config.get('wgScript')+'?title='+encodeURIComponent(Title)+'" '
                 + 'title="'+Title+'">'+Title+'</a>';
    var HistLink = '<a '+Type+'href="'+Server+mw.config.get('wgScript')+'?title='+encodeURIComponent(Title)+'&action=history" '
                 + 'title="'+GlobalWatchlist_Text["Link_hist_title"]+'">'+GlobalWatchlist_Text["Link_hist_text"]+'</a>';
    var EditLink = '<a '+Type+'href="'+Server+mw.config.get('wgScript')+'?title='+encodeURIComponent(Title)+'&action=edit" '
                 + 'title="'+GlobalWatchlist_Text["Link_edit_title"]+'">'+GlobalWatchlist_Text["Link_edit_text"]+'</a>';
    var StopLink = '<a '+Type+'href="'+Server+mw.config.get('wgScript')+'?title='+encodeURIComponent(Title)+'&action=unwatch" '
                 + 'title="'+GlobalWatchlist_Text["Link_unwatch_title"]+'">'+GlobalWatchlist_Text["Link_unwatch_text"]+'</a>';
    var Users = new Array();
    var watchmissing = false;
    var diffsize = 0;
    for(var a=0,l=Lis.length;a<l;a++){
        if($(Lis[a]).hasClass("mw-changeslist-line-watched")) watchmissing = true;
        var User = $.makeArray( $(Lis[a]).find('span.mw-user a'))[0].innerHTML;
        var UserLink = '<a '+Type+'href="'+Server+'/wiki/User:'+encodeURIComponent(User)+'" '
                 + 'title="User:'+User+'">'+User+'</a>';
        Users.push(UserLink);
        var SizeSpan = $.makeArray( $(Lis[a]).find('span.mw-sizespan'))[0];
        if(SizeSpan){
            var ThisSize = parseInt(SizeSpan.innerHTML.replace(/[^0-9\-]/g, ""));
            diffsize = diffsize + ThisSize;
        }
        var PageTitle = $.makeArray( $(Lis[a]).find('span.mw-title a'))[0];
        PageTitle.parentNode.removeChild(PageTitle);
        var FirstSeperator = $.makeArray( $(Lis[a]).find('span.mw-changeslist-separator'))[0];
        FirstSeperator.parentNode.removeChild(FirstSeperator);
    }
    var UserLinks = new Array();
    var UserLinksCount = new Array();
    for(var a=0,l=Users.length;a<l;a++){
      var ThisUserLink = Users[a];
      var index = UserLinks.indexOf(ThisUserLink);
      if(index==-1){
        UserLinks.push(ThisUserLink);
        UserLinksCount.push(1);
      }else{
        UserLinksCount[index] = (UserLinksCount[index]+1);
      }
    }
    for(var a=0,l=UserLinks.length;a<l;a++){
      if(UserLinksCount[a]>1) UserLinks[a] = UserLinks[a] + "("+UserLinksCount[a]+"×)";
    }
    var tags = "";
    for(var tag in GlobalWatchlist_Text["Tags"]){
      tags += GlobalWatchlist_Text["Tags"][tag];
    }  
    var sizeclass = "mw-plusminus-null";
    if(diffsize<0) sizeclass = "mw-plusminus-neg";
    if(diffsize>0) sizeclass = "mw-plusminus-pos";
    var sizespan = '<span class="mw-sizespan '+sizeclass+'">'+((diffsize*diffsize>250000)?'<b>('+diffsize+')</b>':'('+diffsize+')' )+'</span>';
    var NotifyText = '<span class="notag">$00 </span><span class="mw-changeslist-date" title="$01">$02</span> ($05|$06|$07) <span class="mw-changeslist-separator">. .</span> <span class="mw-title">$03</span> <span class="mw-changeslist-separator">. .</span> $12 <span class="mw-changeslist-separator">. .</span> <span class="changedby">[$14]</span>';
    NotifyText = NotifyText.split('$00').join(tags);
    NotifyText = NotifyText.split('$01').join(Server);
    NotifyText = NotifyText.split('$02').join(Time);
    NotifyText = NotifyText.split('$03').join(PageLink);
    NotifyText = NotifyText.split('$05').join(HistLink);
    NotifyText = NotifyText.split('$06').join(EditLink);
    NotifyText = NotifyText.split('$07').join(StopLink);
    NotifyText = NotifyText.split('$12').join(sizespan);
    NotifyText = NotifyText.split('$14').join(UserLinks.join(" ; "));
    for(var servername in GlobalWatchlist_Classes){
        if(Server.indexOf(servername)!=-1) $(NewLi).addClass(GlobalWatchlist_Classes[servername]);
    }

    if(watchmissing) $(NewLi).addClass("mw-changeslist-line-watched");
    else $(NewLi).addClass("mw-changeslist-line-not-watched");
    var Span = document.createElement('span');
    Span.innerHTML = NotifyText;
    NewLi.insertBefore(Span, NewLi.firstChild);
    NewLi.insertBefore(GlobalWatchlist_GroupULEdits_CreateToggleLink(NewLi), NewLi.firstChild);
}

function GlobalWatchlist_GroupULEdits_CreateToggleLink(NewLi){
   var Link = document.createElement('a');
   Link.className = "GlobalWatchlist-toggleLink";
   Link.title = GlobalWatchlist_Text["ToggleLink_opened_Title"];
   Link.innerHTML = GlobalWatchlist_Text["ToggleLink_opened_Text"];
   Link.href = "javascript:;";
   Link.onclick = function(){ GlobalWatchlist_ToggleEdits(this); return false; }
   return Link;
}

function GlobalWatchlist_ToggleEdits(ToggleLink){
  if(!ToggleLink) return;
  var Li = ToggleLink.parentNode;
  var Ul = Li.getElementsByTagName('ul')[0];
  if(!Ul) return;
  if(ToggleLink.title == GlobalWatchlist_Text["ToggleLink_closed_Title"]){
    Ul.style.display = "";
    ToggleLink.title = GlobalWatchlist_Text["ToggleLink_opened_Title"];
    ToggleLink.innerHTML = GlobalWatchlist_Text["ToggleLink_opened_Text"];
  }else{
    Ul.style.display = "none";
    ToggleLink.title = GlobalWatchlist_Text["ToggleLink_closed_Title"];
    ToggleLink.innerHTML = GlobalWatchlist_Text["ToggleLink_closed_Text"];
  }
  ToggleLink.blur();
}

// Fonction de lancement

if((mw.config.get('wgCanonicalSpecialPageName')=="Blankpage")&&(mw.config.get('wgTitle').split("/")[1]==="GlobalWatchlist")){
  mw.loader.load('//fr.wikipedia.org/w/index.php?title=MediaWiki:Gadget-GlobalWatchlist.css&action=raw&ctype=text/css', 'text/css');
  $(GlobalWatchlist_Init);
}
$(GlobalWatchlist_Link);

// </nowiki></pre>

Démarrer une discussion sur Utilisateur:Dr Brains/GlobalWatchlist.js

Démarrer une discussion
{{bottomLinkPreText}} {{bottomLinkText}}
Discussion utilisateur:Dr Brains/GlobalWatchlist.js
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?