Re-fix pull req #245:
* Must declare port variable. * Must look for https first, then http.
This commit is contained in:
parent
e6500004de
commit
b66ffcddcf
|
@ -31,7 +31,7 @@ load: function (callback) {
|
||||||
|
|
||||||
// Render default UI and initialize settings menu
|
// Render default UI and initialize settings menu
|
||||||
start: function(callback) {
|
start: function(callback) {
|
||||||
var html = '', i, sheet, sheets, llevels;
|
var html = '', i, sheet, sheets, llevels, port;
|
||||||
|
|
||||||
// Stylesheet selection dropdown
|
// Stylesheet selection dropdown
|
||||||
sheet = WebUtil.selectStylesheet();
|
sheet = WebUtil.selectStylesheet();
|
||||||
|
@ -59,12 +59,12 @@ start: function(callback) {
|
||||||
// set manually
|
// set manually
|
||||||
port = window.location.port;
|
port = window.location.port;
|
||||||
if (!port) {
|
if (!port) {
|
||||||
if (window.location.protocol.substring(0,4) == 'http') {
|
if (window.location.protocol.substring(0,5) == 'https') {
|
||||||
port = 80;
|
|
||||||
}
|
|
||||||
else if (window.location.protocol.substring(0,5) == 'https') {
|
|
||||||
port = 443;
|
port = 443;
|
||||||
}
|
}
|
||||||
|
else if (window.location.protocol.substring(0,4) == 'http') {
|
||||||
|
port = 80;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Populate the controls if defaults are provided in the URL */
|
/* Populate the controls if defaults are provided in the URL */
|
||||||
|
|
Loading…
Reference in New Issue