MediaWiki

GoogleSearch.js: Difference between revisions

No edit summary
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 2: Line 2:
function install_search()
function install_search()
{
{
document.getElementById('searchBody').innerHTML='<form action="http://vanipedia.org/wiki/Vanipedia:GoogleSearch" id="searchbox_014896513456545327470:ghkptjyj_oe">'+
document.getElementById('searchBody').innerHTML+='<form action="http://vanipedia.org/wiki/Vanipedia:GoogleSearch" id="searchbox_014896513456545327470:ghkptjyj_oe">'+
'  <input type="hidden" name="cx" value="014896513456545327470:ghkptjyj_oe" />'+
'  <input type="hidden" name="cx" value="014896513456545327470:ghkptjyj_oe" />'+
'  <input type="hidden" name="cof" value="FORID:11" />'+
'  <input type="hidden" name="cof" value="FORID:11" />'+
'  <input type="text" name="q" size="15" />'+
'  <input id="google_search" type="text" name="q" size="16" />'+
'  <input type="submit" name="sa" value="Search" />'+
'  <input type="submit" name="sa" value="Search" />'+
'</form>';
'</form>';

Latest revision as of 15:07, 5 May 2008

// adds Google Custom Search to sidebar   www.wikipedia.org/wiki/User:Henrik/sandbox/google-search
function install_search()
{
document.getElementById('searchBody').innerHTML+='<form action="http://vanipedia.org/wiki/Vanipedia:GoogleSearch" id="searchbox_014896513456545327470:ghkptjyj_oe">'+
'  <input type="hidden" name="cx" value="014896513456545327470:ghkptjyj_oe" />'+
'  <input type="hidden" name="cof" value="FORID:11" />'+
'  <input id="google_search" type="text" name="q" size="16" />'+
'  <input type="submit" name="sa" value="Search" />'+
'</form>';
document.write('<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_014896513456545327470%3Aghkptjyj_oe&lang=en"></script>');
}
addOnloadHook(install_search);

// end Google Custom Search