Next article: Ranting Again
Previous article: The Fallacy of Pro vs. Am
Chris is working on some hacks for Chimera. Hacking WebsiteDefaults.strings to use JavaScript in its URIs is quite cool. Since it’s basically the same idea as a bookmarklet, I tried improving on Chris’ hack by using the Google bookmarklet that Tim developed a few years ago. As expected it works like a charm in WebsiteDefaults.strings.
Here’s the code:
javascript:Qr=document.getSelection();if(!Qr){void(Qr=prompt('What do you want to search for on Google?',''))};
if(Qr)location.href='http://google.com/search?query='
+escape(Qr)+'&num=10&sa='
Use this for SearchPageDefault in WebsiteDefaults.strings. The advantages of this code are several.
Keep up the good work, Chris. Let us know when you actually have something to download. I’d love to see what you’ve got.
By the way, if you are not a Mac über-poweruser like Chris, you have to ctrl-click on the Chimera icon to get the context menu, then click on “Package Contents” to access this stuff.
The URL to trackback this post is:
http://kevinbasil.com/2002/09/12/hacking-chimera/trackback/
Copyright © 2002–2011 Kevin Robert (Basil) Fritts, all rights reserved.