Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2.  
  3.   var googleCtrl;
  4.   var Search;
  5.  
  6.   google.load('search', '1', {language : 'sv', style : google.loader.themes.MINIMALIST});
  7.   google.setOnLoadCallback(function() {
  8.     var customSearchControl = new google.search.CustomSearchControl('010402539020160411713:vamu1c4kn6i');
  9.     googleCtrl = customSearchControl;
  10.     customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
  11.     var options = new google.search.DrawOptions();
  12.     options.setSearchFormRoot('cse-search-form');
  13.     customSearchControl.draw('cse', options);
  14.     if(Search != null)
  15.         googleCtrl.execute(Search);
  16.   }, true);
  17.  
  18.   function searchGoogle(input) {
  19.     if(googleCtrl == null)
  20.     {
  21.         Search = input;
  22.     } else {
  23.         googleCtrl.execute(input);
  24.     }
  25.   }
  26. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement