aboutsummaryrefslogtreecommitdiff
path: root/web/simple/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/simple/app.js')
-rw-r--r--web/simple/app.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/web/simple/app.js b/web/simple/app.js
index d622e5cc..a37d9d5c 100644
--- a/web/simple/app.js
+++ b/web/simple/app.js
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 Anton Tananaev (anton@traccar.org)
+ * Copyright 2016 - 2017 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-var url = 'http://localhost:8082';
-var token = 'TOKEN';
+var url = window.location.protocol + '//' + window.location.host;
+var token = (window.location.search.match(/token=([^&#]+)/) || [])[1];
var style = new ol.style.Style({
image: new ol.style.Circle({