Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Search highlighted term for coupon code
// paste the javascript string below into a browser bookmark (as the location)
// highlight the text on the page and a new tab or window will open searching
// with the highlighted text and the word 'coupon code'
// NOTE: apparently this only works in Firefox (for now, at least)
// Google
javascript:(function(){var%20text%20=%20window.content.getSelection().toString();window.open('http://www.google.com/search?q='+text+'%20coupon%20code');})();
// Bing
javascript:(function(){var%20text%20=%20window.content.getSelection().toString();window.open('http://www.bing.com/search?q='+text+'%20coupon%20code');})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment