Utilisateur:Robin Hood/monobook.js
Apparence
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) ;
Firefox (sur GNU/Linux) / Chrome / Internet Explorer / Opera : maintenez la touche Ctrl en cliquant sur le bouton Actualiser ou pressez Ctrl-F5.mw.loader.using('mediawiki.util', function () {
// AJOUTE DEUX ONGLETS MONOBOOK
function ajoutOngletJS() {
var a = document.getElementById("p-cactions");
if (a) {
b = a.getElementsByTagName("ul");
if(b.length > 0) {
b[0].innerHTML = b[0].innerHTML
+ '<li id="ca-nstab-user">'
+ '<a href="/wiki/Utilisateur:Robin_Hood/monobook.js">'
+ 'js</a></li>';
}
}
}
function ajoutOngletCSS() {
var a = document.getElementById("p-cactions");
if (a) {
b = a.getElementsByTagName("ul");
if(b.length > 0) {
b[0].innerHTML = b[0].innerHTML
+ '<li id="ca-nstab-user">'
+ '<a href="/wiki/Utilisateur:Robin_Hood/monobook.css">'
+ 'css</a></li>';
}
}
}
// AJOUTE UN ONGLET STRUCTURE
function ajoutOngletStructure() {
var a = document.getElementById("p-cactions");
if (a) {
b = a.getElementsByTagName("ul");
if(b.length > 0) {
b[0].innerHTML = b[0].innerHTML
+ '<li id="ca-nstab-user">'
+ '<a href="/wiki/Utilisateur:Robin_Hood/Structure">'
+ 'Structure</a></li>';
}
}
}
// AJOUTE UN ONGLET TERRAIN DE JEU
function ajoutOngletTerrainJeu() {
var a = document.getElementById("p-cactions");
if (a) {
b = a.getElementsByTagName("ul");
if(b.length > 0) {
b[0].innerHTML = b[0].innerHTML
+ '<li id="ca-nstab-user">'
+ '<a href="/wiki/Utilisateur:Robin_Hood/BàS">'
+ 'Terrain de jeu</a></li>';
}
}
}
// AJOUTE LES LIENS DANS LA BOÎTE DE NAVIGATION
function ajoutLiens() {
var a = document.getElementById("p-navigation");
if (a) {
b = a.getElementsByTagName("ul");
if(b.length > 0) {
b[0].innerHTML = b[0].innerHTML
+ '<li><a style="display: inline" title="Meta:Sorting order" '
+ 'href="http://meta.wikimedia.org/wiki/Interwiki_sorting_order">'
+ 'Ordre des interwikis</a></li>'
+ '<li><a style="display: inline" title="Wikipédia:Le Bistro" '
+ 'href="/w/index.php?title=Wikip%C3%A9dia:Le_Bistro&action=purge">'
+ 'Le Bistro</a></li>'
+ '<li><a style="display: inline" title="Suivis" '
+ 'href="http://fr.wikipedia.org/w/index.php?title=Special:Watchlist&days=0">'
+ 'Tous les suivis</a>'
+ '<a style="display: inline" title="Suivis" '
+ 'href="http://fr.wikipedia.org/w/index.php?title=Special:Watchlist&days=3">'
+ '3 jours</a>'
+ '<a style="display: inline" title="Suivis" '
+ 'href="http://fr.wikipedia.org/w/index.php?title=Special:Watchlist&days=1">'
+ '1 jour</a></li>'
}
}
}
$(ajoutLiens);
if ( mw.config.get('wgCanonicalNamespace') == "User" || mw.config.get('wgCanonicalNamespace') == "User_talk" ) {
$(ajoutOngletJS);
$(ajoutOngletStructure);
$(ajoutOngletCSS);
$(ajoutOngletTerrainJeu);
}
// AJOUTE LES LIENS DANS LA BOÎTE À OUTILS
$(function () {
if ( mw.config.get('wgCanonicalNamespace') == "User" || mw.config.get('wgCanonicalNamespace') == "User_talk" ) {
url = mw.config.get('wgServer')
+ "/w/index.php?title=Special:Log&user="
+ mw.config.get('wgTitle').split("/")[0];
}
else if ( mw.config.get('wgCanonicalNamespace') == "Special" ) {
return;
}
else {
url = mw.config.get('wgServer')
+ "/w/index.php?title=Special:Log&page="
+ mw.config.get('wgPageName');
}
mw.util.addPortletLink("p-tb", "http://tools.wikimedia.de/~interiot/cgi-bin/count_edits?user=Robin+Hood&dbname=frwiki_p", "Compteur d'éditions", "ca-editcount");
mw.util.addPortletLink("p-cactions", url, "Journal", "pt-logs");
});
});