Last active
March 18, 2016 21:24
-
-
Save SamNazar/3f7acf255a380f4dc2ec to your computer and use it in GitHub Desktop.
Chrome custom search engine for wine data for Bryan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Bookmarklet form that searches for the current selection, opening 2 new windows (will trip popup-blocker) | |
javascript:(function(){search = document.getSelection().toString().split(" ").join("+"); window.open("http://www.cellartracker.com/list.asp?fInStock=0&Table=List&iUserOverride=0&szSearch=" + search); window.open("http://www.wine-searcher.com/find/" + search); })(); | |
// chrome custom search engine, opens one new window/tab as well as assigning the current location | |
javascript:{search = "%s".split(" ").join("+"); window.open("http://www.cellartracker.com/list.asp?fInStock=0&Table=List&iUserOverride=0&szSearch=" + search); window.location.assign("http://www.wine-searcher.com/find/" + search); } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can replace the window.location.assign() with another window.open(), but you'll have to tell chrome's popup blocker to allow popups from newtab.