I created a javascript function that does searches within my site with the google search API, but I would like the word I type to appear only something linked to my site, it is currently bringing results from google.
js code:
<script>
(function() {
var cx = 'minhachave';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:')
'//cse.google.com/cse.js?cx=' + cx
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
How do I search only within my site?