-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
74 lines (67 loc) · 2.46 KB
/
index.html
File metadata and controls
74 lines (67 loc) · 2.46 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Just pure black screen</title>
<style>
* {
margin: 0;
padding: 0;
}
#time {
top: 50%;
width: 100%;
text-align: center;
color: #0c0c0c;
position: absolute;
font-size: 150pt;
transform: translateY(-50%);
font-family: Roboto, Arial, sans-serif;
}
</style>
</head>
<body style="height: 100vh; width: 100%; background: #000">
<h1>Just pure black screen</h1>
<p>This is just a pure black screen. Click or press F11 on your keyboard to switch to fullscreen.</p>
<p id="time"></p>
<script>
function updateTime() {
const timeElm = document.getElementById("time")
if (timeElm) {
const now = new Date();
const h = now.getHours().toString().padStart(2, "0");
const m = now.getMinutes().toString().padStart(2, "0");
timeElm.innerText = `${h}:${m}`
}
}
updateTime();
setInterval(updateTime, 1000);
function toggleFullscreen() {
const elem = document.body;
if (!document.fullscreenElement && !document.mozFullScreenElement &&
!document.webkitFullscreenElement && !document.msFullscreenElement) {
if (elem.requestFullscreen) {
elem.requestFullscreen();
} else if (elem.msRequestFullscreen) {
elem.msRequestFullscreen();
} else if (elem.mozRequestFullScreen) {
elem.mozRequestFullScreen();
} else if (elem.webkitRequestFullscreen) {
elem.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
}
} else {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
}
}
}
document.body.onclick = toggleFullscreen
</script>
</body>
</html>