Bläddra i källkod

Merge pull request #252 from astrand/port-80-443

Re-fix pull req #245:
Joel Martin 12 år sedan
förälder
incheckning
8f12ca7a5a
1 ändrade filer med 5 tillägg och 5 borttagningar
  1. 5 5
      include/ui.js

+ 5 - 5
include/ui.js

@@ -31,7 +31,7 @@ load: function (callback) {
 
 // Render default UI and initialize settings menu
 start: function(callback) {
-    var html = '', i, sheet, sheets, llevels;
+    var html = '', i, sheet, sheets, llevels, port;
 
     // Stylesheet selection dropdown
     sheet = WebUtil.selectStylesheet();
@@ -59,12 +59,12 @@ start: function(callback) {
     // set manually
     port = window.location.port;
     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;
+        }
     }
 
     /* Populate the controls if defaults are provided in the URL */