From 1d14740a661488ab34b2c97b6aa86b9591b7289e Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sun, 11 Nov 2012 20:13:20 +0100 Subject: [PATCH] http: Show incoming WebSocket messages on the placeholder page --- mopidy/frontends/http/index.html | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/mopidy/frontends/http/index.html b/mopidy/frontends/http/index.html index f3f0b208..37823577 100644 --- a/mopidy/frontends/http/index.html +++ b/mopidy/frontends/http/index.html @@ -8,7 +8,7 @@ background: #e8ecef; color: #555; font-family: "Droid Serif", Georgia, "Times New Roman", Palatino, - "Hoefler Text", Baskerville, serif;; + "Hoefler Text", Baskerville, serif; font-size: 150%; line-height: 1.4em; } @@ -53,6 +53,10 @@ .box.focus a { color: #e8ecef; } + #ws-console { + height: 200px; + overflow: auto; + } @@ -99,6 +103,10 @@ ws.onmessage = function (event) { console.log("Incoming message: ", event.data); }; ws.send("Message to the server, ahoy!"); + +

Here you can see events arriving from Mopidy in real time:

+ +

     
 
     
@@ -107,5 +115,16 @@ ws.send("Message to the server, ahoy!");

For more information, please refer to the Mopidy documentation at docs.mopidy.com.

+ +