summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
Diffstat (limited to 'assets')
-rw-r--r--assets/mapper.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/assets/mapper.js b/assets/mapper.js
index e4451a5..083405b 100644
--- a/assets/mapper.js
+++ b/assets/mapper.js
@@ -146,12 +146,13 @@ Categories.forEach(function(c) {
})
// Where do we get our JSON data from
-if (location.href.includes('localhost')) {
- const api_base = 'http://localhost/data/'
-} else {
- const api_base = 'https://map.incommon.cc/data/'
- //const api_base = 'http://maps.dewey.be/api'
+function apiBaseUrl() {
+ if (location.href.includes('localhost')) {
+ return 'http://localhost/data/'
+ }
+ return 'https://map.incommon.cc/data/'
}
+const api_base = apiBaseUrl()
const cat_uri = api_base + '/categories.json'
/**