Jump to content

Please help me with this Google Site Search Bookmarklet. I'd like to remove the function of searching for highlighted text. The idea is to use this in the FF awesomebar with a bookmark keyword, e.g. "s" then the search term. So in the awesomebar you'd type "s search words" and it'd search the current site.

javascript:q=""+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);if(!q)q=prompt("Search%20terms%20[leave%20selection%20and%20box%20blank%20to%20list%20all%20pages]%20...").replace(/\s\+/g,"%252B");if(q!=null)location="http://www.google.com/search?q="+q.replace(/\s+/g,"+")+"+site:"+location.hostname;void(0);

Thanks for any help!

Link to comment
https://linustechtips.com/topic/385341-help-with-simple-java-bookmarklet/
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×