Skip to content

Instantly share code, notes, and snippets.

@andremoreno
Created August 28, 2014 05:50
Show Gist options
  • Save andremoreno/4f2d4afaab55c001597d to your computer and use it in GitHub Desktop.
Save andremoreno/4f2d4afaab55c001597d to your computer and use it in GitHub Desktop.
Open search result links in same window using CSE for ikutlahaku.com
<script>
(function() {
var cx = 'xx:xx';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//www.google.com/cse/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search linktarget="_parent"></gcse:search>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment