Fix URL autocomplete when using Privoxy

Jul 14, '05 07:07:00AM

Contributed by: cwatts

I was hunting through my drive for things to delete and I came across an old instll of Privoxy. I decided to upgrade to 3.03 and fire it up, and was immediately reminded of why I loved it -- no flashing banners or popups I was also reminded of why I turned it off -- it kills the autocomplete feature of Safari.

Some people have noticed this behavior and commented on it here, but as far as I know, there is no solution posted. A little googling turned up this hint, which I just tried and it works great. Read the rest if you'd like the step-by-step instructions...

In the Terminal, cd to /Library/Privoxy/templates and type this:

sudo cp no-such-domain no-such-domain.old
Enter your administrator password. Then, type open ., and a Finder window will open for this folder. Drag the file called no-such-domain to the text editor of your choice, and just below these lines (the DOCTYPE line has been split for a narrower display):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  "http://www.w3.org/TR/html4/strict.dtd">
<html> 
add the following text:
<!-- Privoxy Autocomplete workaround (begin) -->
<script type="text/javascript">;
var host="@host@"
var pos=host.indexOf("www")
if (pos==-1)
{
window.location="http://www.@host@.com"
}
</script>;
<!-- Privoxy Autocomplete workaround (end) -->;
Save the file, and quit. Your browser should now add the www. and .com to any domain you type into the browser.

Comments (5)


Mac OS X Hints
http://hints.macworld.com/article.php?story=2005070411304373