diff --git a/docroot/last/config.js b/docroot/last/config.js
deleted file mode 100644
index d93411a..0000000
--- a/docroot/last/config.js
+++ /dev/null
@@ -1,10 +0,0 @@
-
-/*
- * Optionally rename the topic in the location popup on the map
- */
-
-var renames = {
- 'jjolie/phone' : 'Jane Jolie',
- 'john/android' : "John Smith",
-
-};
diff --git a/docroot/last/config.js.sample b/docroot/last/config.js.sample
deleted file mode 100644
index 3cb9500..0000000
--- a/docroot/last/config.js.sample
+++ /dev/null
@@ -1,9 +0,0 @@
-
-/*
- * Optionally rename the topic in the location popup on the map
- */
-
-var renames = {
- 'jjolie/phone' : 'Jane Jolie',
- 'john/android' : "John Smith",
-};
diff --git a/docroot/last/index.html b/docroot/last/index.html
index 928ddfa..d7b32f6 100644
--- a/docroot/last/index.html
+++ b/docroot/last/index.html
@@ -1,90 +1,35 @@
-
+
+
Recorder Map
-
-
-
+
-
-
-
-
-
-
-
-
-
+
+
diff --git a/docroot/last/last.html b/docroot/last/last.html
index da0c75b..20fd6db 100644
--- a/docroot/last/last.html
+++ b/docroot/last/last.html
@@ -1,47 +1,71 @@
-
-WebSocket Test
-
-
-OwnTracks Recorder WebSocket Test
-
+ //let num_messages = 0;
+
+ // location.host localhost:8080 localhost:8083
+ // location.pathname /otr/ws.html /ws.html
+
+ const url = getApiUrl("last", { useWebsocket: true });
+
+ displayMessage(`CONNECTING TO: ${url.href}`);
+
+ const websocket = new WebSocket(url);
+ websocket.addEventListener("open", () => {
+ displayMessage('CONNECTED');
+ const msg = 'LAST';
+ displayMessage('SENT: ' + msg);
+ websocket.send(msg);
+ });
+ websocket.addEventListener("close", () => {
+ displayMessage('DISCONNECTED');
+ });
+ websocket.addEventListener("message", event => {
+ if (!event.data) {
+ displayMessage('PING... ');
+ } else {
+ displayMessage(escapeHTML `RESPONSE: ${ event.data } `);
+ debug("RESPONSE:", event.data);
+ //num_messages++;
+ }
+ /*
+ if (num_messages > 3) {
+ websocket.send('exit');
+ } */
+ });
+ websocket.addEventListener("error", event => {
+ console.error(event);
+ displayMessage(escapeHTML `ERROR: ${ event.data } `);
+ });
+
+
+
+
+
+ OwnTracks Recorder WebSocket Test
+
+
+