Prechádzať zdrojové kódy

The https check should come first

A similar change was made to ui.js in #252.
John Dewey 12 rokov pred
rodič
commit
eb955f8c20
1 zmenil súbory, kde vykonal 4 pridanie a 4 odobranie
  1. 4 4
      vnc_auto.html

+ 4 - 4
vnc_auto.html

@@ -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.