Redirect HTTP links to HTTPS with Javascript
39 38 bytes

with(location)protocol='https'+href[4]

How it works

If location.href starts with http:, this assigns location.protocol = 'https:'.
If location.href starts with https:, this assigns location.protocol = 'httpss'.  According to the specification, this should have no effect because httpss is neither http nor https.  Firefox obeys this specification.  Chrome seems to try to find an external app to open the httpss scheme (bug).