DO NOT USE THIS SCRIPT!
Almost all modern browsers have functionality similar to what this script sought to provide back in 2006, before the EFF started their “HTTPS Everywhere” browser extension in 2010. That extension, being an actual browser extension, was able to do what this script wanted to do much more efficiently, so I basically didn’t bother with this script anymore. As I write this in 2023, even the HTTPS Everywhere browser extension is deprecated since its functionality comes built‐in with all of the major browsers. Chances are high that your browser already does what you think you want this script to do.
I considered removing the script, but for the time being, I want to leave it up as a historical curiosity.
Please don’t install the script and think you’re getting any amount of privacy or security from it that you weren’t already getting. Given the age of this, chances are that you’d actually be decreasing your security and/or privacy by using this script.