Utilisateur:Ohkami/monobook.js
De Wikipedia, l'encyclopédie encyclopedia
////////////////////////////////// LiveRC importScript('User:EDUCA33E/LiveRC.js');
////////////////////////////////// BistroDuJour
obtenir('BistroDuJour');
////////////////////////////////// Evaluation var alwaysEval = false; //mettez cette valeur à true si vous voulez que l'évaluation soit lancée automatiquement (à éviter en temps normal) function initEvalProjectNames() {
evalProjectNames=new Array(); //liste de vos projets evalProjectNames.push("Hockey sur glace") // evalProjectNames.push("Sport") //mettre ici autant de lignes comme celle-ci que de projets que vous voulez évaluer
}
////////////////////////////////// lien vers Special:Upload function LienUploadDirect() {
var a = document.getElementById("p-tb"); if (a) { b = a.getElementsByTagName("ul"); if(b.length > 0) { b[0].innerHTML = b[0].innerHTML
+ '
'
}
}
}
$(LienUploadDirect);
////////////////////////////////// Boutons d'édition perso
function creerBoutonsVote()
{
var messages_debut = new Array();
var messages_fin = new Array();
var images = new Array();
var commentaires = new Array();
with (messages_debut)
{
push("");
push("");
push("");
push("");
push("");
push("");
push("");
push("");
push("");
push("");
}
with (messages_fin)
{
push("# Conserver");
push("# Supprimer");
push("# Neutre");
push("# Réticence");
push("# Transformer en redirection");
push("# Fusionner");
push("# Bon article");
push("# Attendre");
push("*");
push("* Non");
}
with (images)
{
push("http://upload.wikimedia.org/wikipedia/commons/c/c8/Button_conserver2.png");
push("http://upload.wikimedia.org/wikipedia/commons/0/00/Button_supprimer.png");
push("http://upload.wikimedia.org/wikipedia/commons/1/1d/Button_neutre2.png");
push("http://upload.wikimedia.org/wikipedia/commons/4/4d/Button_reticence.png");
push("http://upload.wikimedia.org/wikipedia/commons/5/5f/Button_rediriger.png");
push("http://upload.wikimedia.org/wikipedia/commons/4/4a/Button_fusionner.png");
push("http://upload.wikimedia.org/wikipedia/commons/d/de/Button_bon_article.png");
push("http://upload.wikimedia.org/wikipedia/commons/3/3f/Button_attendre.png");
push("http://upload.wikimedia.org/wikipedia/commons/4/4e/Button_fait2.png");
push("http://upload.wikimedia.org/wikipedia/commons/5/5e/Button_non.png");
}
with (commentaires)
{
push("Conserver");
push("Supprimer");
push("Neutre");
push("Réticence");
push("Rediriger");
push("Fusionner");
push("Bon article");
push("Attendre");
push("Fait");
push("Non");
}
if (document.createTextNode)
{
if (document.getElementById("toolbar"))
{
for (var cpt = 0; cpt < messages_fin.length; cpt++)
{
addButton(images[cpt], commentaires[cpt], messages_debut[cpt], messages_fin[cpt], "", "");
}
}
}
}
$(creerBoutonsVote);
////////////////////////////////// DeluxeSummary perso
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("infos")
titles.push("mef")
titles.push("portails")
titles.push("voir aussi")
titles.push("liens int")
titles.push("bandeau")
titles.push("cat")
titles.push("interwiki")
titles.push("images")
titles.push("infobox")
titles.push("style")
titles.push("ortho/gram")
titles.push("retouches")
titles.push("réf")
titles.push("mise en forme réf")
var inputs = new Array()
inputs.push("ajout d’infos")
inputs.push("mise en forme")
inputs.push("portails")
inputs.push("reorg. voir aussi")
inputs.push("liens internes")
inputs.push("bandeau")
inputs.push("catégories")
inputs.push("liens interwiki")
inputs.push("images")
inputs.push("infobox")
inputs.push("style et tournures de phrase")
inputs.push("correction orthographe et/ou grammaire")
inputs.push("diverses retouches")
inputs.push("ajout de références")
inputs.push("mise en forme références")
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 + "
" + sumLbl.innerHTML
}
}
$(DeluxeSummary)
///////////Ajouter un lien au menu utilisateur
function nouveauLien()
{
var a = document.getElementById("p-personal");
if (a)
{
b = a.getElementsByTagName("ul");
if(b.length > 0)
{
b[0].innerHTML = b[0].innerHTML
+ '
'; } } } addOnloadHook(nouveauLien); ////////////////////////////////// LIENS GAUCHE/BOITE PERSO, inspirée de Utilisateur:Le gorille/monobook.js function nouvelleBoite() { var l = document.getElementById("p-navigation"); if (l) { l.innerHTML = l.innerHTML + '
Boîte perso
' + '- '
+ '
- <a href="http://fr.wikipedia.org/wiki/Wikipédia:Annonces">Annonces</a> ' + '
- <a href="http://fr.wikipedia.org/wiki/Wikipédia:Bulletin des administrateurs">Bulletin des admins</a> ' + '
- <a href="http://fr.wikipedia.org/wiki/Wikipédia:Pages à supprimer">Pages à supprimer</a> ' + '
- <a href="http://fr.wikipedia.org/wiki/Wikipédia:Proposition articles de qualité">Articles de qualité</a> ' + '
- <a href="http://fr.wikipedia.org/wiki/Wikipédia:Prise de décision">Prise de décision</a> ' + '
- <a href="http://fr.wikipedia.org/wiki/Wikipédia:Sondage">Sondages</a> ' + '
- <a href="http://fr.wikipedia.org/wiki/Utilisateur:Maloq/AdvancedContribs">AdContribs</a> | <a href="http://fr.wikipedia.org/wiki/Utilisateur:EDUCA33E/LiveRC">LiveRC</a> ' + '
- <a href="http://fr.wikipedia.org/wiki/Roller in line hockey">RILH</a> (<a href="http://fr.wikipedia.org/wiki/Catégorie:Roller in line hockey">c</a>-<a href="http://fr.wikipedia.org/wiki/Catégorie:Modèle roller in line hockey">m</a>) ' + '
- <a href="http://fr.wikipedia.org/wiki/Portail:Hockey sur glace">Hockey</a> (<a href="http://fr.wikipedia.org/wiki/Projet:Hockey sur glace">p</a>-<a href="http://fr.wikipedia.org/wiki/Special:Suivi des liens/Catégorie:Portail:Hockey sur glace/Articles liés">s</a>-<a href="http://fr.wikipedia.org/wiki/Discussion Projet:Hockey sur glace">d</a>-<a href="http://fr.wikipedia.org/wiki/Catégorie:Hockey sur glace">c</a>-<a href="http://fr.wikipedia.org/wiki/Catégorie:Modèle hockey sur glace">m</a>) ' + '
';
}
}
$(nouvelleBoite);
///////// Onglet Stats ////// function addArticleTrafficStatistics() {
var histo = document.getElementById("ca-history"); if(histo) { var lien = document.createElement("a"); var today = new Date(); var annee = today.getFullYear(); 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("Frequentation")); var stats = document.createElement("li"); stats.setAttribute("id", "ca-stats"); stats.appendChild(lien); histo.parentNode.insertBefore(stats, histo.nextSibling); }
} $(addArticleTrafficStatistics);