From 464b1e3bedc720d8ce293fc2451dcc73375cc06f Mon Sep 17 00:00:00 2001 From: parisminton Date: Tue, 21 Nov 2017 18:18:22 -0500 Subject: [PATCH] Set the protocol and domain ourselves. --- client/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/index.js b/client/index.js index 149674a4..af629f2d 100644 --- a/client/index.js +++ b/client/index.js @@ -27,8 +27,10 @@ function timestamp () { + addZero(d.getSeconds()) + '_'; } +var pre_pro = window.location.protocol, + pre_host = window.location.host; -d3.json("/settings/labels.json", function(err, labels){ +d3.json(pre_pro + "//" + pre_host + "/settings/labels.json", function(err, labels){ // Populate labels menu d3.select("#input-label") @@ -45,7 +47,7 @@ d3.json("/settings/labels.json", function(err, labels){ }); // end label ingestion -d3.json("/settings/themes.json", function(err, themes){ +d3.json(pre_pro + "//" + pre_host + "/settings/themes.json", function(err, themes){ var errorMessage;