Merge pull request #303 from retr0h/https-first

The https check should come first.
This commit is contained in:
Samuel 2013-10-09 01:38:55 -07:00
commit 5eed5a4e17
1 changed files with 5 additions and 5 deletions

View File

@ -128,12 +128,12 @@
// if port == 80 (or 443) then it won't be present and should be
// set manually
if (!port) {
if (window.location.protocol.substring(0,4) == 'http') {
port = 80;
}
else if (window.location.protocol.substring(0,5) == 'https') {
if (window.location.protocol.substring(0,5) == 'https') {
port = 443;
}
else if (window.location.protocol.substring(0,4) == 'http') {
port = 80;
}
}
// If a token variable is passed in, set the parameter in a cookie.