Google Browser Button
Posted: Mon Jan 04, 2010 9:51 am
I love the Google Browser Button (http://www.google.com/options/buttons.html). The search button is the following Javascript
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
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)Thanks
Milind