HTTP-to-HTTPS redirector

in
Subscribe to HTTP-to-HTTPS redirector 5 posts, 5 voices



ert18 User

hy

the script does not work by me. anyone can help/support me please?

what i must change exactly in the script?

thank you in advance!

 
ahoier User
ChromeWindows

You add the relevant // @include lines to the top header of the script for any site that you would like to "force" SSL login or browsing....

Just follow the examples that are already present.

I was able to add facebook.com, myspace.com, etc...

MANY sites now have "secure" login processes so your passwords aren't sent over wireless without any encryption.

 
Frederik &qu... Script's Author
FirefoxX11

I've added Facebook, Twitter, MySpace, YouTube, and FastMail to the list in the newest version. If you know of any other sites that ought to be included, feel free to let me know. :)

 
stribika User
FirefoxX11

Hi.

As I understand this first loads the page through HTTP then it redirects to the same URL with HTTPS. This means that the data (or at least parts of it) is sent in the clear. I tried to make some improvements but it ended up being too Facebook specific. The problem there is even when I load the HTTPS version most links point to HTTP. So here is the code maybe you can include a more generic version:

if (location.href.indexOf("https://") < 0) {
	location.href = location.href.replace(/http\:/, 'https:');
} else {
	window.addEventListener("DOMContentLoaded", function() {
		var query = "//a[starts-with(@href, 'http://www.facebook.com/')] | //a[starts-with(@href, 'http://facebook.com/')]";
		var links = document.evaluate(query, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
		for (var i = 0; i < links.snapshotLength; ++i) {
			var link = links.snapshotItem(i);
			link.href = link.href.replace(/http\:/, 'https:');
		}
	}, false);
}

 
shadowcrystal User
FirefoxWindows

i have a few sites you could add in an update of this script:

http://www.microsoft.com
http://www.google.com

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel