Page 1 of 1

Google Browser Button

Posted: Mon Jan 04, 2010 9:51 am
by Milind
I love the Google Browser Button (http://www.google.com/options/buttons.html). The search button is the following Javascript

Code: Select all

javascript:q=document.getSelection();for(i=0;i<frames.length;i++){q=frames[i].document.getSelection();if(q)break;}if(!q)void(q=prompt('Keywords:',''));if(q)location.href='http://www.google.com/search?client=googlet&q='+escape(q)
This works fine as long as I have a page loaded. But when if I open a new tab and click on the button, the search dialog is not displayed. If I allow scripts globally, it works. How can I allow this script to run from a blank page without enabling global scripting?

Thanks
Milind

Re: Google Browser Button

Posted: Mon Jan 04, 2010 3:56 pm
by Alan Baxter
Hi, Milind. I've confirmed your issue. I'm sorry I don't have a fix for it, but Giorgio may come up with a change to the button's javascript or NoScript settings.

Until then, consider typing your search text in the Firefox search bar instead. It seems just as easy to me.

Re: Google Browser Button

Posted: Mon Jan 04, 2010 4:07 pm
by Giorgio Maone

Re: Google Browser Button

Posted: Wed Jan 06, 2010 10:34 am
by Milind
Worked like a charm! Thanks.