User:Padawane/monobook.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
![]() | The accompanying .css page for this skin is at User:Padawane/monobook.css. |
// <nowiki>
function globalSearch()
{
var pSearchElement = document.getElementById('searchform');
var newElement = document.createElement("input");
newElement.setAttribute("type", "button");
newElement.setAttribute("name", "globalsearch");
newElement.setAttribute("class", "searchButton");
newElement.setAttribute("value", "Recherche globale");
newElement.setAttribute("onClick", "startSearch()");
pSearchElement.appendChild(newElement);
}
$(globalSearch);
// merci à Eskimo pour les autres icônes
function DeluxeBar() {
if (document.createTextNode) {
var toolbar = document.getElementById("toolbar");
if (!toolbar) return;
///// zone personnalisable ////
var messages = new Array()
// le texte a été splitté sinon Mediawiki casse tout...
messages[0] = "{{subst:" + "Welcome on your page" + "}}" + "~~" + "~~";
messages[1] = "{{subst:" + "welcome" + "}}" + "~~" + "~~";
messages[2] = "{{subst:" + "test" + "}}" + "~~" + "~~";
messages[3] = "{{subst:" + "test-n|page" + "}}" + "~~" + "~~";
messages[4] = "{{subst:" + "spam" + "}}" + "~~" + "~~";
messages[6] = "{{" + "delete" + "}}";
var images = new Array()
images[0] = "/media/wikipedia/fr/1/12/Button_accueilA.png";
images[1] = "/media/wikipedia/fr/e/eb/Button_accueilB.png";
images[2] = "/media/wikipedia/fr/0/00/Button_vandale.png";
images[3] = "/media/wikipedia/fr/a/ad/Button_vandale2.png";
images[4] = "/media/wikipedia/fr/f/fb/Button_spam2.png";
images[6] = "/media/wikipedia/fr/f/f8/Button_suppr.png";
var commentaires = new Array()
commentaires[0] = "Welcome on your page !"
commentaires[1] = "Welcome !"
commentaires[2] = "Warning"
commentaires[3] = "Warning";
commentaires[4] = "Warning Spam" ;
commentaires[6] = "ask for delete";
////////////////////////////////
for (var i=0;i<messages.length;i++) {
var img = document.createElement("img");
img.setAttribute("src", images[i]);
img.setAttribute("alt", commentaires[i]);
var ref = document.createElement("a");
ref.setAttribute("href", "javascript:insertTags('', \"" + messages[i] + "\", '');" +
"javascript:changeSummary(\"" + commentaires[i] + "\");" );
ref.appendChild(img);
toolbar.appendChild(ref);
}
}
}
// </nowiki>