Utilisateur:Mr Banane/monobook.js/barreoutils.js
Aller à la navigation
Aller à la recherche
Note : après avoir publié vos modifications, il se peut que vous deviez forcer le rechargement complet du cache de votre navigateur pour voir les changements.
- Firefox / Safari : maintenez la touche Maj (Shift) en cliquant sur le bouton Actualiser ou appuyez sur Ctrl + F5 ou Ctrl + R (⌘ + R sur un Mac).
- Google Chrome : appuyez sur Ctrl + Maj + R (⌘ + Shift + R sur un Mac).
- Internet Explorer / Edge : maintenez la touche Ctrl en cliquant sur le bouton Actualiser ou pressez Ctrl + F5.
- Opera : appuyez sur Ctrl + F5.
/*
* Deluxe Bar
*
* Barre d'outils d'édition étendue
*
* Auteur : Dake
* Dernière révision : 3 novembre 2006
*/
//////////////////////ZONE PERSONNALISABLE//////////////////////
var deluxebarMessages = new Array();
var deluxebarImages = new Array();
var deluxebarCommentaires = new Array();
with (deluxebarMessages) {
push("{{subst:" + "Bienvenue5" + "}}");
push("{{subst:" + "Bienvenue" + "}}");
push("{{" + "Poney" + "}}");
push("[[Utilisateur:El kloklo|El kloklo]]");
}
with (deluxebarImages) {
push("http://images.wikia.com/desencyclopedie/images/4/46/Vienbenue.gif");
push("http://images.wikia.com/desencyclopedie/images/4/46/Vienbenue.gif");
push("http://images1.wikia.nocookie.net/desencyclopedie/images/thumb/e/e6/Poney.jpg/24px-Poney.jpg");
push("http://images2.wikia.nocookie.net/desencyclopedie/images/thumb/9/95/Monkey_costume.jpg/21px-Monkey_costume.jpg");
}
with (deluxebarCommentaires) {
push("Bienvenue !");
push("Bienvenue !");
push("Encore un putain de [[poney-club]]");
push("J'ai dit une [[User:El kloklo|El Clownerie]]");
}
/////////////////FIN DE LA ZONE PERSONNALISABLE/////////////////
function DeluxeBar() {
if (document.createTextNode) {
var toolbar = document.getElementById("toolbar");
if (!toolbar) return;
for (var i=0;i<deluxebarMessages.length;i++) {
var img = document.createElement("img");
img.setAttribute("src", deluxebarImages[i]);
var ref = document.createElement("a");
ref.setAttribute("href", "javascript:insertTags('', \"" + deluxebarMessages[i] + "\", '');" +
"javascript:changeSummary(\"" + deluxebarCommentaires[i] + "\");" );
ref.appendChild(img);
toolbar.appendChild(ref);
}
}
}
function changeSummary(sampleText) {
var resum = document.editform.wpSummary.value;
if(resum != 0 && resum.indexOf("*/") < resum.length - 3) {
document.editform.wpSummary.value += " ; ";
}
document.editform.wpSummary.value += sampleText;
}
addLoadEvent(DeluxeBar);