MediaWiki:GoogleAPI.js

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
(New page: <script type="text/javascript"> //<![CDATA[ google.load('search', '1.0'); function OnLoad() { // Create a search control var searchControl = new google....)
 
m
 
(19 intermediate revisions by one user not shown)
Line 1: Line 1:
    <script type="text/javascript">
+
  google.load('search', '1.0');
    //<![CDATA[
+
   
+
    google.load('search', '1.0');
+
 
   
 
   
 
     function OnLoad() {
 
     function OnLoad() {
 
       // Create a search control
 
       // Create a search control
       var searchControl = new google.search.SearchControl();
+
       var searchControl = new google.search.SearchControl(null);
+
       var options = new google.search.SearcherOptions();
      // Add in a full set of searchers
+
       options.setExpandMode(google.search.SearchControl.EXPAND_MODE_OPEN);
       var localSearch = new google.search.LocalSearch();
+
       searchControl.addSearcher(new google.search.ImageSearch(),options);
       searchControl.addSearcher(localSearch);
+
       //var options2 = new google.search.SearcherOptions();
      searchControl.addSearcher(new google.search.WebSearch());
+
       //options2.setExpandMode(google.search.SearchControl.EXPAND_MODE_PARTIAL);
       searchControl.addSearcher(new google.search.VideoSearch());
+
       //options2.setRoot(document.getElementById("scW"));
       searchControl.addSearcher(new google.search.BlogSearch());
+
       //searchControl.addSearcher(new google.search.WebSearch(),options2);
       searchControl.addSearcher(new google.search.NewsSearch());
+
       searchControl.draw(document.getElementById("scI"));
       searchControl.addSearcher(new google.search.ImageSearch());
+
       setTimeout(function(){searchControl.execute("{{{1}}}");},200);
       searchControl.addSearcher(new google.search.BookSearch());
+
    }
       searchControl.addSearcher(new google.search.PatentSearch());
+
    google.setOnLoadCallback(OnLoad, true);
+
       // Set the Local Search center point
+
      localSearch.setCenterPoint("New York, NY");
+
+
      // tell the searcher to draw itself and tell it where to attach
+
      searchControl.draw(document.getElementById("searchcontrol"));
+
+
      // execute an inital search
+

Latest revision as of 17:08, 7 September 2010

   google.load('search', '1.0');
 
    function OnLoad() {
      // Create a search control
      var searchControl = new google.search.SearchControl(null);
      var options = new google.search.SearcherOptions();
      options.setExpandMode(google.search.SearchControl.EXPAND_MODE_OPEN);
      searchControl.addSearcher(new google.search.ImageSearch(),options);
      //var options2 = new google.search.SearcherOptions();
      //options2.setExpandMode(google.search.SearchControl.EXPAND_MODE_PARTIAL);
      //options2.setRoot(document.getElementById("scW"));
      //searchControl.addSearcher(new google.search.WebSearch(),options2);
      searchControl.draw(document.getElementById("scI"));
      setTimeout(function(){searchControl.execute("{{{1}}}");},200);
    }
    google.setOnLoadCallback(OnLoad, true);
Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox