forked from r128w/misc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathp2p.html
71 lines (65 loc) · 2.17 KB
/
p2p.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
<!DOCTYPE html>
<html>
<head>
<title>Ryan Gosling fan club</title>
<script src="https://unpkg.com/[email protected]/dist/peerjs.min.js"></script>
<style>
body {
background-color: var(--bg-color, #222);
color: var(--text-color, #fff);
}
#displaybox {
background-color: var(--chat-bg-color, #1c1c1c);
height: 300px;
overflow-y: auto;
padding: 10px;
}
#samplebox {
background-color: var(--msg-bg-color, #222);
margin: 5px 0;
padding: 5px;
border-radius: 5px;
}
#customization-panel {
position: fixed;
top: 10px;
right: 10px;
background-color: #292929;
color: #fff;
padding: 10px;
border: 1px solid #444;
border-radius: 5px;
}
.hidden {
display: none;
}
</style>
</head>
<body>
<h1 style="text-align: center;">Ryan Gosling fan club</h1>
<ul id="peerList" style="padding: 10px; color: #ccc;"></ul>
<div id="displaybox"></div>
<div id="messageInput">
<div id="usernamebox" contenteditable="true">ryan gosling fan</div>
<div id="messagebox" contenteditable="true"></div>
<button onclick="sendMessage()">Send</button>
</div>
<div id="samplebox" class="hidden">
<strong>[[[username]]] </strong><span>[[[message]]]</span> <em>[[[timestamp]]]</em>
</div>
<!-- Customization Panel -->
<div id="customization-panel">
<h3>Customize Colors</h3>
<label for="bg-color">Background:</label>
<input type="color" id="bg-color" value="#222"><br>
<label for="text-color">Text:</label>
<input type="color" id="text-color" value="#ffffff"><br>
<label for="chat-bg-color">Chat Box:</label>
<input type="color" id="chat-bg-color" value="#1c1c1c"><br>
<label for="msg-bg-color">Message Box:</label>
<input type="color" id="msg-bg-color" value="#222"><br>
<button onclick="applyCustomizations()">Apply</button>
</div>
<script src="main.js"></script>
</body>
</html>