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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="A simple secure web conferencing application using webrtc"
/>
<link rel="stylesheet" href="/style.css" />
<title>keks-meet</title>
</head>
<body class="start">
<div class="start-box">
<h1>keks-meet</h1>
<p class="description">
A simple secure conferencing application using webrtc
</p>
<br />
<p class="instructions">
To start a meeting, click 'Create room' and share the URL with all
participants. You can also optionally set the room name below.
</p>
<p class="instructions">
keks-meet is free software! It is licenced under the terms of
the third version of the GNU Affero General Public Licence only.
</p>
<noscript>
keks-meet needs evil javascript to be enabled. Don't be afraid
though, all the code is free (AGPL-3.0-only)! Look at it on
<a href="https://codeberg.org/metamuffin/keks-meet">codeberg</a>
</noscript>
<script>
function random_name() {
const frags = [
[
"Delicious",
"Flavourful",
"Fluffy",
"Glowing",
"Irradiated",
"Magic",
"Radiant",
"Small",
"Soft",
"Sweet",
"Tasty",
"Yummy",
],
[
"Apple",
"Banana",
"Berry",
"Blueberry",
"Chocolate",
"Lemon",
"Lime",
"Pineapple",
"Potato",
"Pumpkin",
"Raspberry",
"Strawberry",
"Tomato",
"Vanilla",
],
[
"Biscuit",
"Cake",
"Cookie",
"Crêpe",
"Cupcake",
"Dessert",
"Icecream",
"Meal",
"Milkshake",
"Muffin",
"Pancake",
"Pie",
"Sandwish",
"Snack",
],
];
return frags
.map(f => f[Math.floor(Math.random() * f.length)])
.join("")
.trim();
}
function random_secret() {
const random = window.crypto.getRandomValues(
new Uint8Array(10) // 80b (+ ~11b from name) entropy
);
return Array.from(random)
.map((b) => b.toString(16).padStart(2, "0"))
.join("");
}
const rname = random_name();
const room_input = document.createElement("input");
room_input.type = "text";
room_input.id = "room-id-input";
room_input.placeholder = `Edit room name: ${rname}`;
room_input.ariaLabel = "Room Secret";
const submit = document.createElement("input");
submit.type = "button";
function go() {
if (room_input.value.length == "") room_input.value = rname;
const url = `/room#${room_input.value}#${random_secret()}`;
window.location.href = url;
}
submit.addEventListener("click", () => go());
room_input.addEventListener("keydown", (ev) => {
if (ev.code == "Enter") go();
});
submit.value = "Create room!";
document
.querySelector("div.start-box")
?.append(room_input, document.createElement("br"), submit);
</script>
</div>
</body>
</html>
|