Browse Source

Set the protocol and domain ourselves.

parisminton 6 years ago
parent
commit
464b1e3bed
1 changed files with 4 additions and 2 deletions
  1. 4 2
      client/index.js

+ 4 - 2
client/index.js View File

27
   + addZero(d.getSeconds()) + '_';
27
   + addZero(d.getSeconds()) + '_';
28
 }
28
 }
29
 
29
 
30
+var pre_pro = window.location.protocol,
31
+    pre_host = window.location.host;
30
 
32
 
31
-d3.json("/settings/labels.json", function(err, labels){
33
+d3.json(pre_pro + "//" + pre_host + "/settings/labels.json", function(err, labels){
32
 
34
 
33
   // Populate labels menu
35
   // Populate labels menu
34
   d3.select("#input-label")
36
   d3.select("#input-label")
45
 
47
 
46
 }); // end label ingestion
48
 }); // end label ingestion
47
 
49
 
48
-d3.json("/settings/themes.json", function(err, themes){
50
+d3.json(pre_pro + "//" + pre_host + "/settings/themes.json", function(err, themes){
49
 
51
 
50
   var errorMessage;
52
   var errorMessage;
51
 
53