As a further oddness, it does something to the little NoScript icon in the toolbar (yes, I have a toolbar while running Firefox 7.0.1, thank you very much): The script, in case you don't want to read the source, will first check to see if you have any selected text in the active tab; if you do not, it pops up a little window to ask you what terms to search for. While this window is up, the NoScript icon has a little red exclamation point (!) next to the blue-on-white S, as opposed to the usual 'just the blue-on-white S' or red slashed circle.
Here is the source code:
Code: Select all
javascript:q%20=%20""%20+%20(window.getSelection%20?%20window.getSelection()%20:%20document.getSelection%20?%20document.getSelection()%20:%20document.selection.createRange().text);%20if%20(!q)%20q%20=%20prompt("You%20didn't%20select%20any%20text.%20%20Enter%20a%20search%20phrase:",%20"");%20if%20(q!=null)%20location=("http://www.google.com/search?num=100&q=site:"%20+%20escape(location.hostname)%20+%20"%20\""%20+%20escape(q.replace(/\"/g,""))%20+%20"\"").replace(/%20/g,%20"+");%20void%200