MediaWiki

GoogleSearch.js: Difference between revisions

(New page: <!-- Google CSE code begins --> <form id="searchbox_014896513456545327470:ghkptjyj_oe" onsubmit="return false;"> <input type="text" name="q" size="40"/> <input type="submit" value="Sea...)
 
No edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<!-- Google CSE code begins -->
// adds Google Custom Search to sidebar  www.wikipedia.org/wiki/User:Henrik/sandbox/google-search
<form id="searchbox_014896513456545327470:ghkptjyj_oe" onsubmit="return false;">
function install_search()
  <input type="text" name="q" size="40"/>
{
  <input type="submit" value="Search"/>
document.getElementById('searchBody').innerHTML+='<form action="http://vanipedia.org/wiki/Vanipedia:GoogleSearch" id="searchbox_014896513456545327470:ghkptjyj_oe">'+
</form>
'  <input type="hidden" name="cx" value="014896513456545327470:ghkptjyj_oe" />'+
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_014896513456545327470%3Aghkptjyj_oe&lang=en"></script>
'  <input type="hidden" name="cof" value="FORID:11" />'+
 
<input id="google_search" type="text" name="q" size="16" />'+
<div id="results_014896513456545327470:ghkptjyj_oe" style="display:none">
<input type="submit" name="sa" value="Search" />'+
  <div class="cse-closeResults">
'</form>';
    <a>&times; close</a>
document.write('<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_014896513456545327470%3Aghkptjyj_oe&lang=en"></script>');
  </div>
}
  <div class="cse-resultsContainer"></div>
addOnloadHook(install_search);
</div>
 
<style type="text/css">
@import url(http://www.google.com/cse/api/overlay.css);
</style>


<script src="http://www.google.com/uds/api?file=uds.js&v=1.0&key=ABQIAAAAGhxzf3mpiGFlyOFS7mHU1BTFeMWyVtstbgjbWL_EUhziew2K9hRpi2gZwIQLGRz9H4Owh1CYA3O8vA&hl=en" type="text/javascript"></script>
// end Google Custom Search
<script src="http://www.google.com/cse/api/overlay.js"></script>
<script type="text/javascript">
function OnLoad() {
  new CSEOverlay("014896513456545327470:ghkptjyj_oe",
                document.getElementById("searchbox_014896513456545327470:ghkptjyj_oe"),
                document.getElementById("results_014896513456545327470:ghkptjyj_oe"));
}
GSearch.setOnLoadCallback(OnLoad);
</script>
<!-- Google CSE Code ends -->

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