aboutsummaryrefslogtreecommitdiff
path: root/webAO
diff options
context:
space:
mode:
authorsD <stoned@derpymail.org>2020-03-08 12:35:57 +0100
committersD <stoned@derpymail.org>2020-03-08 12:35:57 +0100
commitb0027c58f0e69b752074f2449d01a03ad6cce113 (patch)
tree76f2b16cad03975257132ffe4c6592d7438db678 /webAO
parentf73923a397c965190bb3bb92ffc2044152cb6870 (diff)
use local files if running locally
Diffstat (limited to 'webAO')
-rw-r--r--webAO/client.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/webAO/client.js b/webAO/client.js
index bf4757a..1c5d6e6 100644
--- a/webAO/client.js
+++ b/webAO/client.js
@@ -28,7 +28,8 @@ const serverIP = queryDict.ip;
let mode = queryDict.mode;
// Unless there is an asset URL specified, use the wasabi one
-const AO_HOST = queryDict.asset || "http://s3.wasabisys.com/webao/base/";
+const DEFAULT_HOST = location.hostname ? "http://s3.wasabisys.com/webao/base/" : "base/";
+const AO_HOST = queryDict.asset || DEFAULT_HOST;
const THEME = queryDict.theme || "default";
const MUSIC_HOST = AO_HOST + "sounds/music/";