-
Notifications
You must be signed in to change notification settings - Fork 529
/
Copy pathindex.html
40 lines (34 loc) · 1.15 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<title>Whatsapp API by Ngekoding</title>
</head>
<body>
<div id="app">
<h1>Whatsapp API</h1>
<p>Powered by Ngekoding</p>
<img src="" alt="QR Code" id="qrcode">
<h3>Logs:</h3>
<ul class="logs"></ul>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js" integrity="sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg==" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.3.1/socket.io.min.js" integrity="sha512-/WwtKR6NnHomLo0O4w9QKc1INTPEJs7ko6u2aBTA1paPldhPl8LtXsi7a35iEZ69+9P5dcgVNESG8hrP4Y2t3w==" crossorigin="anonymous"></script>
<script>
$(document).ready(function() {
var socket = io.connect('http://localhost:8000', { path: '/socket.io' });
socket.on('message', function(msg) {
$('.logs').append($('<li>').text(msg));
});
socket.on('qr', function(src) {
$('#qrcode').attr('src', src);
});
socket.on('ready', function(data) {
$('#qrcode').hide();
});
socket.on('authenticated', function(data) {
$('#qrcode').hide();
});
});
</script>
</body>
</html>