Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

screensaver400

macrumors 6502a
Original poster
Jan 28, 2005
863
52
I changed my default search engine in Safari to DuckDuckGo, but occasionally I get poor results and want to try the search in Google.

Sure, I could type Google.com into the location bar, but who wants to do that?

Does anyone know of a a bookmarklet that parses the current DuckDuckGo search from the URL, and shoots you to a Google results page for the same search? I can't imagine it would be tough to whip up, but I'm not a developer.
 
Found one.

Code:
javascript:Q=[];%20c=location.search.slice(1).split('&');%20for%20(i%20in%20c)%20{%20f=c[i].split('=');%20if%20(f[0]=='q'%20||%20f[0]=='as_q'%20||%20f[0]=='p'%20||%20f[0]=='query')%20if%20(f[1])%20Q.push(f[1])%20}%20R=unescape(Q.join(';%20').replace(/\+/g,'%20'));%20location%20=%20'http://google.com/search?query='%20+%20escape(R);
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.