User:Epicgenius/google.js

// Google lookup

function GoogleLookup { var q = "" + (window.getSelection ? window.getSelection                                     : document.getSelection ? document.getSelection                                                              : document.selection.createRange.text); if (!q) q = prompt("You didn't select any text. Enter a search phrase:", ""); if (q!=null) // location="http://www.google.com/search?q=" + escape(q).replace(/ /g, "+"); window.open("http://www.google.com/search?q=" + escape(q).replace(/ /g, "+") ,'new-tab') ; } window.Google=function { addToolboxLink(0, 'javascript:{GoogleLookup;};void(0);', 'Google', 'toolbox_googlelookup'); }