Google_Site_search=function(){... and call this script with this shortcut or a mouse gesture:
var word=window.getSelection().toString();
var site=window.location.hostname.toString();
word=window.prompt('Search word',word);
site=window.prompt('Search in website',site);
var url='http://www.google.com/search?q='+ encodeURI(word +'+site:' +site);
window.open(url, '_blank');
}
Ctrl G=Enable javascript & Delay, 10 & Go to page,"javascript:Google_Site_search()"
Or use it as a bookmarklet:
javascript:(function(){var word=window.getSelection().toString();var site=window.location.hostname.toString(); word=window.prompt('Search word',word);site=window.prompt('Search in website',site);var url='http://www.google.com/search?q='+ encodeURI(word +'+site:' +site); window.open(url, '_blank');})()
No comments:
Post a Comment