User:ScottyWZ/vector.js

if (document.location.protocol.toLowerCase.indexOf("https") !== 0) document.location.href = document.location.href.replace(/^http:/gi, "https:");

/* Yes, I know that eavesdroppers can still see which page I go to this way, * but it's better than nothing. This is intended to help with careless * mistakes where I forget to use the HTTPS version. */