@@ -103,7 +103,7 @@ function addRequests(requests) {
103103function fetchBlacklist ( ) {
104104 const container = document . querySelector ( "#blacklist-count" )
105105 const table = document . querySelector ( "#blacklist" )
106- fetch ( window . location + "api/blacklist" )
106+ fetch ( "http://" + window . location . host + "/ api/blacklist" )
107107 . then ( response => response . json ( ) )
108108 . then ( data => {
109109 if ( ! isEmpty ( data . blacklist ) ) {
@@ -118,7 +118,7 @@ function fetchBlacklist() {
118118function fetchWhitelist ( ) {
119119 const container = document . querySelector ( "#whitelist-count" )
120120 const table = document . querySelector ( "#whitelist" )
121- fetch ( window . location + "api/whitelist" )
121+ fetch ( "http://" + window . location . host + "/ api/whitelist" )
122122 . then ( response => response . json ( ) )
123123 . then ( data => {
124124 if ( ! isEmpty ( data . whitelist ) ) {
@@ -133,7 +133,7 @@ function fetchWhitelist() {
133133function fetchMarklist ( ) {
134134 const container = document . querySelector ( "#marklist-count" )
135135 const table = document . querySelector ( "#marklist" )
136- fetch ( window . location + "api/marklist" )
136+ fetch ( "http://" + window . location . host + "/ api/marklist" )
137137 . then ( response => response . json ( ) )
138138 . then ( data => {
139139 if ( ! isEmpty ( data . marklist ) ) {
@@ -147,7 +147,7 @@ function fetchMarklist() {
147147
148148function fetchBlacklistWithReason ( ) {
149149 const table = document . querySelector ( "#blacklist" )
150- fetch ( window . location + "api/blacklist_with_reason" )
150+ fetch ( "http://" + window . location . host + "/ api/blacklist_with_reason" )
151151 . then ( response => response . json ( ) )
152152 . then ( data => {
153153 insertActorsWithReason ( table , data . blacklist )
@@ -156,7 +156,7 @@ function fetchBlacklistWithReason() {
156156
157157function fetchWhitelistWithReason ( ) {
158158 const table = document . querySelector ( "#whitelist" )
159- fetch ( window . location + "api/whitelist_with_reason" )
159+ fetch ( "http://" + window . location . host + "/ api/whitelist_with_reason" )
160160 . then ( response => response . json ( ) )
161161 . then ( data => {
162162 insertActorsWithReason ( table , data . whitelist )
@@ -165,7 +165,7 @@ function fetchWhitelistWithReason() {
165165
166166function fetchMarklistWithReason ( ) {
167167 const table = document . querySelector ( "#marklist" )
168- fetch ( window . location + "api/marklist_with_reason" )
168+ fetch ( "http://" + window . location . host + "/ api/marklist_with_reason" )
169169 . then ( response => response . json ( ) )
170170 . then ( data => {
171171 insertActorsWithReason ( table , data . marklist )
@@ -174,7 +174,7 @@ function fetchMarklistWithReason() {
174174
175175function fetchActorStatus ( ) {
176176 const address = getAddress ( )
177- fetch ( window . location + "api/actor?address=" + address )
177+ fetch ( "http://" + window . location . host + "/ api/actor?address=" + address )
178178 . then ( response => response . json ( ) )
179179 . then ( data => {
180180 if ( ! isEmpty ( data . status ) ) {
0 commit comments