-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
58 lines (50 loc) · 1.72 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>are.na Mood Wall</title>
<link rel="stylesheet" href="style.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<form onsubmit="return false">
<label for="url">are.na channel url:</label>
<input type="text" id="url" name="url" autofocus autocapitalize="off" />
<label for="fps">fps: <span id="fpsCount"></span></label>
<input
type="range"
id="fps"
name="fps"
min="1"
max="120"
value="10"
onchange="handleFpsChange(this.value)"
oninput="handleFpsChange(this.value)"
/>
<label for="fullscreen">fullscreen:</label>
<input type="checkbox" id="fullscreen" name="fullscreen" />
<input type="submit" value="watch" onclick="watchBoard()" />
</form>
<script>
function handleFpsChange(value) {
document.getElementById("fpsCount").innerHTML = value;
}
handleFpsChange(document.getElementById("fps").value);
function watchBoard() {
const url = document.getElementById("url").value;
const fps = document.getElementById("fps").value;
const fullscreen = document.getElementById("fullscreen").checked;
const channelId = url.split("?")[0].split("/").pop();
const urlParams = new URLSearchParams({
channelId: channelId,
fps: fps,
});
if (fullscreen) {
urlParams.append("fullscreen", true);
}
//window.location.href = `/w.html?${urlParams.toString()}`;
window.location.href = `/are.na-moodwall/w.html?${urlParams.toString()}`;
}
</script>
</body>
</html>