Utilisateur:Plyd/monobook.js/fusion.js

Un article de Wikipédia, l'encyclopédie libre.

Note : Après avoir publié la page, vous devrez forcer son rechargement pour voir les changements : Mozilla / Konqueror / Firefox : Shift-Ctrl-R, Internet Explorer / Opera : Ctrl-F5, Safari : Cmd-R.

/*  <pre><nowiki> */
 
// D'après Anakin
function startGoogleSearch()
{
  var textsearch = document.getElementById('searchInput').value;
 
  var link = "http://www.google.com/search?q=site%3Afr.wikipedia.org+";
  link = link + textsearch;
 
  window.location = link;
}
 
function googleSearch()
{
  var pSearchElement = document.getElementById('searchform');
 
  var newElement = document.createElement("input");
  newElement.setAttribute("type", "button");
  newElement.setAttribute("name", "googlesearch");
  newElement.setAttribute("class", "searchButton");
  newElement.setAttribute("value", "Google wiki-fr");
  newElement.setAttribute("onClick", "startGoogleSearch()");
 
  pSearchElement.appendChild(newElement);
}
addLoadEvent(googleSearch);
 
/* </nowiki></pre> */