-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
49 lines (41 loc) · 1.53 KB
/
Copy pathindex.html
File metadata and controls
49 lines (41 loc) · 1.53 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<title>Guardian desktop notification service (aka Trigger)</title>
<link rel="stylesheet" href="css/app.css" />
<script src="/socket.io/socket.io.js"></script>
<script src="js/id.js"></script>
<script src="js/app.js"></script>
<script src="js/tracking.js"></script>
</head>
<body>
<hgroup>
<h1>Trigger</h1>
<img src="img/trigger.jpg" />
</hgroup>
<div class="actions">
<div>
<p>On some browsers, you may have to explicitly <a href="#" onclick="requestPermission(); return false;">allow notifications</a>. To test your connection, try sending a ping below.</p>
<div>
<a id="profile-link" target="_blank"></a>
</div>
<input type="hidden" name="userId" id="user-id" placeholder="User ID please" />
<input type="text" name="userName" id="user-name" placeholder="Username e.g. cifdebater" />
<button type="button" id="set-user-name">Set username</button>
<!--
<div class="meta">
<p>To get your user ID, <a href="https://profile.code.dev-theguardian.com/signin" target="_blank">login</a>, and then run this in the console:</p>
<pre>require(['common/modules/identity/api'], function() { console.log(arguments[0].getUserFromCookie().id) });</pre>
</div>
-->
</div>
</div>
<div class="meta tools">
<div id="status">Disconnected</div>
<a href="#" onclick="connect(); return false;">Connect</a>
<a href="#" onclick="disconnect(); return false;">Disconnect</a>
<a href="#" onclick="sendPing(); return false;">Send a test message</a>
</div>
<div id="output"></div>
</body>
</html>