summaryrefslogtreecommitdiff
path: root/test/index.html
blob: 41d0a3a08aff377e055958e7493e44c2131a0f28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<html>
  <head>
    <title>rhrdtime - Testclient</title>
    <style type="text/css">
      body {
        background-color: #555;
      }

      #timedata {
        background-color: white;
        border: 1px solid;
        padding: 1em;
        font-family: monospace;
      }
    </style>
    <script src="jquery.min.js"></script>
    <script type="text/javascript">
      function init() {
      var sock = new WebSocket("ws://localhost:3000/time");

      sock.onmessage = function (event) {
          $('#timedata').text(event.data);
        }
      }
    </script>
  </head>
  <body onload="init()">

    <h1>Radio Helsinki Rivendell Time:</h1>

    <div id="timedata"></div>

  </body>
</html>