Utilisateur:ZeMeilleur/monobook.js
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.// à base d'un copier coller de http://fr.wikipedia.org/wiki/Utilisateur:Tvpm/monobook.js
// Utilisation d'une image
// Barre de synthèse des modifs
// Historique des shortpages
// Barre des tabs en bas
// Über-God mod
// -----------------------------------------------------------------------------
// Image située sur différents wiki | Gracias Anakin (:
function ImageUse()
{
if (!(document.getElementById('ca-nstab-image'))) return false;
var imagename = document.getElementById('ca-nstab-image').firstChild.href;
imagename = imagename.substring(imagename.indexOf("Image:") + 6);
var indexofempercent = imagename.indexOf("&");
if (indexofempercent != -1)
imagename = imagename.substring(0, indexofempercent);
if(imagename)
{
var li = document.createElement('li');
li.id = 'ca-imageuse';
var a = document.createElement('a');
a.appendChild(document.createTextNode("Voir l'utilisation"));
a.href = 'http://www.juelich.de/avatar/check-usage/check-usage.php?filename=' + imagename + '&template';
li.appendChild(a);
document.getElementById('ca-watch').parentNode.appendChild(li);
}
}
$(ImageUse);
// -----------------------------------------------------------------------------
// Synthèse rapide des modifs (résumé deluxe), by Gôtô & Dake.
function addToSummary(str)
{
document.editform.wpSummary.value += " " + str
}
function DeluxeSummary()
{
var sumLbl = document.getElementById("wpSummaryLabel")
if (sumLbl)
{
//élargissement boite de résumé
var sumInput = document.getElementById("wpSummary")
sumInput.style.width = "90%"
var titles = new Array()
titles.push("cat")
titles.push("rd")
titles.push("image")
titles.push("interwiki")
titles.push("taxo")
titles.push("pub")
titles.push("Wikif’")
titles.push("Recyc’")
titles.push("Ortho’")
titles.push("Retouches")
titles.push("ajInfo")
titles.push("réorg")
var inputs = new Array()
inputs.push("Catégorisation")
inputs.push("Redirection.")
inputs.push("Ajout(s) ou réparation(s) d’image(s).")
inputs.push("Interwikification de l’article.")
inputs.push("Taxobisation du sujet.")
inputs.push("Sans la pub, c’est mieux.")
inputs.push("Wikification d’éléments.")
inputs.push("Recyclage.")
inputs.push("Problème(s) d’orthographe et/ou de grammaire.")
inputs.push("Diverses retouches.")
inputs.push("Ajout d’infos")
inputs.push("Réorganisation(s).")
var str = ""
for (var cpt = 0; cpt < titles.length; cpt ++)
{
str += "<a href=\"javascript:addToSummary('" + inputs[cpt] + "')\""
+ " class=\"sumLink\" title=\"Ajouter '" + inputs[cpt] +"' dans la boîte de résumé\">"
+ titles[cpt]
+ "</a> "
}
sumLbl.innerHTML = str + "<br />" + sumLbl.innerHTML
}
}
$(DeluxeSummary);
// -----------------------------------------------------------------------------
// Onglet Purge
function OngletPurge() {
var a = document.getElementById("p-cactions");
if (a)
{
var pageName = document.title.replace(" - Wikipédia", "");
b = a.getElementsByTagName("ul");
if(b.length > 0)
{
b[0].innerHTML = b[0].innerHTML
+ '<li id="ca-nstab-user">'
+ '<a href="https://fr.m.vvikipidea.org/w/index.php?action=purge&title=' + pageName + '">purge</a>'
+ '</li>';
}
}
}
$(OngletPurge);
// -----------------------------------------------------------------------------
// Ajout de l'historique/pages liées sur les Special:Shortpages, by Dake (:
if (mw.config.get('wgCanonicalSpecialPageName') === 'Shortpages') {
obtenir('OptimizedShort');
}
//----------------------------------
function addArticleTrafficStatistics()
{
var histo = document.getElementById("ca-history");
if(histo)
{
var lien = document.createElement("a");
var today = new Date();
var annee = today.getYear() + 1900;
var mois = new String(today.getMonth() + 1);
if(mois.length < 2)
{
mois = "0" + mois;
}
lien.setAttribute("href", "http://stats.grok.se/fr/" + annee + mois + "/" + mw.config.get('wgPageName'));
lien.appendChild(document.createTextNode("Consultation"));
var stats = document.createElement("li");
stats.setAttribute("id", "ca-stats");
stats.appendChild(lien);
histo.parentNode.insertBefore(stats, histo.nextSibling);
}
}
addOnloadHook(addArticleTrafficStatistics);
// Outil sur les redirections grâce aux popups
popupFixRedirs = true;