-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
106 lines (96 loc) · 6.81 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" name="viewport" content="width=device-width, initial-scale=1">
<title>ChatNoir</title>
<link rel="stylesheet" href="/lib/w3.css">
<link rel="stylesheet" href="/lib/fontawesome/css/all.css">
<link rel="stylesheet" href="/style.css">
<script src="/lib/jquery-1.12.4.min.js"></script>
<script src="/lib/linkify.min.js"></script>
<script src="/lib/linkify-jquery.min.js"></script>
<script src="/lib/openpgp.min.js"></script>
<script src="/socket.io/socket.io.js"></script>
<link href="/img/favicon.ico" rel="icon" type="image/x-icon"/>
</head>
<body onfocus="focus()">
<div class="w3-bar w3-top w3-border w3-light-gray" style="overflow:visible;">
<div id="mobile_menu" class="w3-dropdown-click">
<button class="w3-bar-item w3-button w3-teal w3-ripple w3-hide-medium w3-hide-large" aria-haspopup="true" onclick="toggleMobileMenu()"><i class="fa fa-bars" aria-hidden="true"></i></button>
<div class="w3-dropdown-content w3-bar-block w3-card-4 w3-light-gray" style="margin-top: 35px">
<button class="w3-bar-item w3-button" onclick="uploadImage(true);$('#mobile_menu .w3-dropdown-content').hide()">Upload image</button>
<button id="mobile_checkbox_img" class="w3-bar-item w3-button" onclick="sendImgMobile();$('#mobile_menu .w3-dropdown-content').hide()">Send as image</button>
<button class="w3-bar-item w3-button" onclick="$('#chat_zone').empty();$('#mobile_menu .w3-dropdown-content').hide()">Clear messages</button>
</div>
</div>
<div class="w3-bar-item w3-black w3-hide-small"><b>ChatNoir</b></div>
<div id="help" class="w3-bar-item w3-button w3-teal w3-hide-small" onclick="help()">Need help?</div>
<button class="w3-bar-item w3-button w3-right w3-teal w3-ripple w3-hide-small" onclick="clickLogin()">Logout</button>
<button class="w3-bar-item w3-button w3-right w3-teal w3-ripple w3-hide-medium w3-hide-large" onclick="clickLogin()"><i class="fa fa-sign-out-alt" aria-hidden="true"></i></button>
<div id="nickname_tag" class="w3-bar-item w3-right"><span class="w3-hide-small">You are </span><b><span id="nickname">client-x</span></b><span class="w3-hide-small">.</span></div>
<div id="afk" class="w3-bar-item w3-right" style="color: green" onclick="$('#connected').toggle()"><i class="fa fa-circle" aria-hidden="true"><span class="w3-hide-small"> Connected users</span></i></div>
<div class="w3-dropdown-hover w3-right keyarea">
<div class="w3-bar-item w3-hover-gray"><img src="/img/keyko.png" id="key" class="keyarea" height="20" width="20" onclick="showkey()"></div>
<div class="w3-dropdown-content w3-bar-block w3-card-4 w3-light-gray" style="margin-top: 35px">
<button id="genkey" class="w3-bar-item w3-button" onclick="genKey()">Generate key</button>
<button class="w3-bar-item w3-button" onclick="genKeyNode()">Get key from local server</button>
<button class="w3-bar-item w3-button" onclick="deleteKey()">Delete key</button>
</div>
</div>
<button id="volume_button" class="w3-bar-item w3-button w3-right w3-ripple" onclick="clickVolume()"><i id="volume_icon" class="fa fa-volume-off fa-lg" aria-hidden="true"></i></button>
</div>
<div id="key_modal" class="w3-modal">
<div class="w3-modal-content">
<div class="w3-container">
<span onclick="$('#key_modal').hide()" class="w3-button w3-display-topright">×</span>
<p id="wait_please"><i class="fa fa-spinner w3-spin" aria-hidden="true"></i> Request sent; please wait while your key is being generated...</p>
<p id="gen_error" hidden><i class="fa fa-exclamation-circle" aria-hidden="true"></i> An error occurred during key generation!</p>
</div>
</div>
</div>
<div id="upload_image_modal" class="w3-modal">
<div class="w3-modal-content">
<div class="w3-container">
<span onclick="$('#upload_image_modal').hide();$('#checkbox_img').prop('checked', false)" class="w3-button w3-text-teal w3-display-topright"><i class="fa fa-window-close" aria-hidden="true"></i></span>
<iframe id="upload_image_modal_iframe" src="">
<p>Your browser does not support iframes.</p>
</iframe>
</div>
</div>
</div>
<div id="tts_voice_modal" class="w3-modal">
<div class="w3-modal-content">
<div class="w3-container">
<span onclick="$('#tts_voice_modal').hide()" class="w3-button w3-text-teal w3-display-topright"><i class="fa fa-window-close" aria-hidden="true"></i></span>
<p>Select a voice:
<select id="select_voices">
</select>
</p>
<p>Volume: <input id="volume_voice" type="number" min="1" max="10" value="10"></p>
<p><input id="checkbox_readAloud" type="checkbox" onclick="rosChange()"> Read on send</p>
</div>
</div>
</div>
<aside id="connected" class="w3-animate-zoom">
</aside>
<section id="chat_zone" class="w3-container">
</section>
<div id="unread_messages" class="w3-panel w3-green w3-display-container w3-display-bottomright" style="transform: translateY(-50px)">
<p><span id="unr_count">0</span> unread messages</p>
<span onclick="this.parentElement.style.display='none'"
class="w3-button w3-large w3-display-topright">×</span>
</div>
<footer id="chat_form" class="w3-bar w3-bottom w3-border w3-light-gray">
<input class="w3-bar-item w3-input" type="text" name="message" id="message" placeholder="Type your message here..." size="60" autofocus onkeydown="pressKey(event)" oninput="inputChange()" onfocus="inputChange()"/>
<button class="w3-bar-item w3-button w3-teal w3-ripple w3-right w3-hide-small" onclick="send()">Send</button>
<button id="upload_img" class="w3-bar-item w3-button w3-teal w3-ripple w3-right w3-hide-small" onclick="uploadImage()" hidden>Upload image</button>
<div class="w3-bar-item w3-right w3-hide-small"><input id="checkbox_img" type="checkbox" onclick="toggleImg()"> img.</div>
<div class="w3-bar-item w3-right w3-hide-small"><img id="send_secured" class="keyarea" height="20" width="20" hidden src="/img/unsecured.png"></div>
<div class="w3-bar-item w3-right w3-hide-small w3-hide-medium"><b>[to <span id="dest" onclick="selectConnected('all')">all</span>]</b></div>
<button class="w3-bar-item w3-button w3-teal w3-ripple w3-right w3-hide-small" onclick="$('#chat_zone').empty()">Clear</button>
<button class="w3-bar-item w3-button w3-red w3-ripple w3-right w3-hide-small" onclick="panic()">Panic!!</button>
<button id="readAloud_button" class="w3-bar-item w3-button w3-teal w3-ripple w3-right w3-hide-small" onclick="readAloud()">Read</button>
</footer>
<script src="/script.js"></script>
</body>
</html>