Note : après avoir enregistré la page, vous devrez forcer le rechargement complet du cache de votre navigateur pour voir les changements.

Mozilla / Firefox / Konqueror / Safari : maintenez la touche Majuscule (Shift) en cliquant sur le bouton Actualiser (Reload) ou pressez Maj-Ctrl-R (Cmd-R sur Apple Mac) ;

Chrome / Internet Explorer / Opera : maintenez la touche Ctrl en cliquant sur le bouton Actualiser ou pressez Ctrl-F5.
/*
* Barre de navigation verticale située à droite de l'écran.
* Auteur : Lepsyleon
*/

mw.loader.addStyleTag(
'#div_gotop_lpl{position:fixed;display:inline-block;right:0;top:15%;z-index:10}'
+ '#gotop_lpl{list-style:none;margin:0;padding:0}'
+ '#gotop_lpl li{height:20px;margin:10px 0}'
+ '#gotop_lpl span{width:0;right:0;position:absolute;overflow:hidden;padding:0}'
+ '#gotop_lpl a{height:20px;width:10px;display:block;position:relative}'
+ '.b1{background-color:#318CE7;border-radius:4px 0 0 4px}'
+ '.b2{background-color:#A5D152;border-radius:4px 0 0 4px}'
+ '.b3{background-color:#B22222;border-radius:4px 0 0 4px}'
+ '.b4{background-color:#F0C300;border-radius:4px 0 0 4px}'
+ '#gotop_lpl a:hover span{width:25px;overflow:visible;padding:0 5px}'
+ '#gotop_lpl a:hover{background-color:transparent}'
+ '#gotop_lpl .b1 span{border-left:5px solid #318CE7;height:20px}'
+ '#gotop_lpl .b2 span{border-left:5px solid #A5D152;height:20px}'
+ '#gotop_lpl .b3 span{border-left:5px solid #B22222;height:20px}'
+ '#gotop_lpl .b4 span{border-left:5px solid #F0C300;height:20px}'
);

var topLink = function ($) {
	
mw.loader.using( [ 'moment', 'user' ] ).done( function () {	

var Today = function() {
var now = moment();
now.locale( 'fr' );  // Ne pas dépendre de la langue de l’utilisateur
return ( now.format('D MMMM YYYY') );
};

var Mois = function(){
var now = moment();
now.locale( 'fr' );
return now.format('MMMM YYYY');
};

mw.messages.set({
'gotop-header': 'Haut de page',
'gotop-footer': 'Bas de page',
'gotop-bulladm': 'Bulletin des administrateurs',
'gotop-reqadm': 'Requête aux administrateurs',
'gotop-newbie': 'Forum des nouveaux',
'gotop-bistro': 'Bistro du jour',
'gotop-bistroC': 'Commons:Bistro',
'gotop-bistroWD': 'Wikidata:Bistro',
'gotop-oracle': 'Oracle du mois',
'gotop-refresh': 'Rafraîchir la page',
'gotop-lds': 'Liste de suivi',
});

var GoTop_Div = document.createElement('div');
GoTop_Div.className = "noprint";
GoTop_Div.id = "div_gotop_lpl";

var GoTop_HTML = ''
+ '<ul id="gotop_lpl">'
+ '<li>'
+ '<a class="b1" href="#" title="'+ mw.msg('gotop-header')+'">'
+ '<span><img src="//upload.wikimedia.org/wikipedia/commons/a/af/1uparrow.png" height=20 width=20 border=0 /></span></a>'
+ '</li>'
+ '<li>'
+ '<a class="b1" onclick="window.scrollTo(0,document.body.scrollHeight);" title="'+ mw.msg('gotop-footer')+'">'
+ '<span><img src="//upload.wikimedia.org/wikipedia/commons/7/7d/1downarrow.png" height=20 width=20 border=0 /></span></a>'
+ '</li>';

if(window.refreshGT === true) {
GoTop_HTML += '<li>'
+ '<a class="b2" href="'+ mw.util.getUrl( null, { action: 'purge' } )+'" title="'+ mw.msg('gotop-refresh')+'">'
+ '<span><img src="//upload.wikimedia.org/wikipedia/commons/b/bb/Farm-Fresh_arrow_refresh_small.png" height=20 width=20 border=0 /></span></a></li>';
}

if(window.ldsGT === true) {
GoTop_HTML += '<li>'
+ '<a class="b2" href="https://fr.m.vvikipidea.org/wiki/Special:Watchlist" title="'+ mw.msg('gotop-lds')+'">'
+ '<span><img src="//upload.wikimedia.org/wikipedia/commons/0/05/Klipper_dock.png" height=20 width=20 border=0 /></span></a></li>';
}

switch (mw.config.get('wgWikiID')) {
case 'frwiki':
	
if(window.bulladmGT === true) {
GoTop_HTML += '<li>'
+ '<a class="b4" href="//fr.wikipedia.org/wiki/Wikipédia:Bulletin_des_administrateurs" title="'+ mw.msg('gotop-bulladm')+'">'
+ '<span><img src="https://upload.wikimedia.org/wikipedia/commons/b/bd/Nuvola_apps_package_editors.png" height=20 width=20 border=0 /></span></a></li>';
}

if(window.reqadmGT === true) {
GoTop_HTML += '<li>'
+ '<a class="b4" href="//fr.wikipedia.org/wiki/Wikipédia:Requête_aux_administrateurs" title="'+ mw.msg('gotop-reqadm')+'">'
+ '<span><img src="//upload.wikimedia.org/wikipedia/commons/7/71/Nuvola_apps_kwrite.png" height=20 width=20 border=0 /></span></a></li>';
}

if(window.newbieGT === true) {
GoTop_HTML += '<li>'
+ '<a class="b3" href="//fr.wikipedia.org/wiki/Wikipédia:Forum_des_nouveaux/Flow" title="'+ mw.msg('gotop-newbie')+'">'
+ '<span><img src="//upload.wikimedia.org/wikipedia/commons/6/62/Gnome-mime-application-x-gnome-app-info.png" height=20 width=20 border=0 /></span></a></li>';
}

if(window.bistroGT === true) {
GoTop_HTML += '<li>'
+ '<a class="b3" href="//fr.wikipedia.org/wiki/Wikipédia:Le_Bistro/'+ Today()+'" title="'+ mw.msg('gotop-bistro')+'">'
+ '<span><img src="//upload.wikimedia.org/wikipedia/commons/3/3d/Icon_stat_bar.png" height=20 width=20 border=0 /></span></a></li>';
}

if(window.oracleGT === true) {
GoTop_HTML += '<li>'
+ '<a class="b3" href="//fr.wikipedia.org/wiki/Wikipédia:Oracle/'+ Mois()+'" title="'+ mw.msg('gotop-oracle')+'">'
+ '<span><img src="//upload.wikimedia.org/wikipedia/commons/9/98/Run.png" height=20 width=20 border=0 /></span></a></li>';
}
break;

case 'commonswiki':

if(window.bistroGT === true) {
GoTop_HTML += '<li>'
+ '<a class="b3" href="//commons.wikimedia.org/wiki/Commons:Bistro" title="'+ mw.msg('gotop-bistroC')+'">'
+ '<span><img src="//upload.wikimedia.org/wikipedia/commons/3/3d/Icon_stat_bar.png" height=20 width=20 border=0 /></a></span></li>';
}
break;

case 'wikidatawiki':

if(window.bistroGT === true) {
GoTop_HTML += '<li>'
+ '<a class="b3" href="//www.wikidata.org/wiki/Wikidata:Bistro" title="'+ mw.msg('gotop-bistroWD')+'">'
+ '<span><img src="//upload.wikimedia.org/wikipedia/commons/3/3d/Icon_stat_bar.png" height=20 width=20 border=0 /></a></span></li>';
}
break;

}

GoTop_HTML += '</ul>';
GoTop_Div.innerHTML = GoTop_HTML;
document.body.insertBefore(GoTop_Div, document.body.firstChild);

} );	
	
};
$(document).ready(topLink);