MediaWiki

GoogleSearch.js: Difference between revisions

No edit summary
No edit summary
 
(6 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
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_014896513456545327470%3Aghkptjyj_oe&lang=en"></script>
function install_search()
 
{
<div id="results_014896513456545327470:ghkptjyj_oe" style="display:none">
document.getElementById('searchBody').innerHTML+='<form action="http://vanipedia.org/wiki/Vanipedia:GoogleSearch" id="searchbox_014896513456545327470:ghkptjyj_oe">'+
  <div class="cse-closeResults">
<input type="hidden" name="cx" value="014896513456545327470:ghkptjyj_oe" />'+
    <a>&times; close</a>
<input type="hidden" name="cof" value="FORID:11" />'+
  </div>
<input id="google_search" type="text" name="q" size="16" />'+
  <div class="cse-resultsContainer"></div>
<input type="submit" name="sa" value="Search" />'+
</div>
'</form>';
 
document.write('<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_014896513456545327470%3Aghkptjyj_oe&lang=en"></script>');
<style type="text/css">
}
@import url(http://www.google.com/cse/api/overlay.css);
addOnloadHook(install_search);
</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