Przeglądaj źródła

Set the protocol and domain ourselves.

parisminton 7 lat temu
rodzic
commit
464b1e3bed
1 zmienionych plików z 4 dodań i 2 usunięć
  1. 4 2
      client/index.js

+ 4 - 2
client/index.js Wyświetl plik

@@ -27,8 +27,10 @@ function timestamp () {
27 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 35
   // Populate labels menu
34 36
   d3.select("#input-label")
@@ -45,7 +47,7 @@ d3.json("/settings/labels.json", function(err, labels){
45 47
 
46 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 52
   var errorMessage;
51 53