Utilisateur:Superouioui/monobook.js

Une page de Wikipédia, l'encyclopédie libre.
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) ;

Chrome / Internet Explorer / Opera : maintenez la touche Ctrl en cliquant sur le bouton Actualiser ou pressez Ctrl-F5.
//</source>{{Catégorisation JS}}
//[[Image:GoogleSearch JS.png|thumb|Illustration]]<source lang="javascript" line="">
/*
 * GoogleSearch
 *
 * Bouton de recherche dans Google
 * 
 * Auteur : Pabix
 * Dernière révision : 10 novembre 2006
 */

//////////////////////ZONE PERSONNALISABLE//////////////////////
/* Serveur Google préféré */ var googlesearchPrefix = "com";
/////////////////FIN DE LA ZONE PERSONNALISABLE/////////////////

function GoogleSearch(){
        var sb = document.getElementById("searchBody");
        if (sb) {
                var input = document.createElement("input");
                with(input) {
                        setAttribute("type", "hidden");
                        setAttribute("name", "q");
                }
                var button = document.createElement("button");
                button.innerHTML="Google";
                button.setAttribute("class", "searchButton");
                var form = document.createElement("form");
                with(form) {
                        setAttribute("action", "http://www.google.com/custom?hl=fr&client=google-coop-np&cof=AH%3Aleft%3BCX%3Amon%2520google%3BL%3Ahttp%3A%2F%2Fwww.google.com%2Fcoop%2Fimages%2Fgoogle_custom_search_sm.gif%3BLH%3A55%3BLP%3A1%3BGFNT%3A%23666666%3BDIV%3A%23cccccc%3B&q=" + googlesearchPrefix + "&btnG=Rechercher&cx=007773836531696701292%3An9ijggx7asm");
                        setAttribute("method", "GET");
                       setAttribute("onsubmit", 'this.q.value=document.getElementById("searchInput").value ;return true;');
                        appendChild(input);
                        appendChild(button);
                }
                sb.appendChild(form);
        }
}
$(GoogleSearch);
//</source>{{Catégorisation JS}}
importScript('MediaWiki:Gadget-Popups.js');

obtenir("OngletGoogle");