-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
75 lines (61 loc) · 1.57 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
<html>
<head>
<style>
.item {
width: 100%;
}
.container {
display: flex;
flex-wrap: wrap;
flex-direction: row;
background-color: DodgerBlue;
}
button {
background-color: #f1f1f1;
/* margin: 10px; */
padding: 20px;
font-size: 100px;
flex: 0 50%;
height: 20vh;
}
button {
padding: 15px;
font-size: 50px;
}
@media (min-height: 550px) {
button {
padding: 20px;
font-size: 100px;
}
}
.full-width {
flex-basis: 100%;
}
</style>
</head>
<body>
<div id='container' class='container'>
<button class='item' data-path='back5'>5s <</button>
<button class='item' data-path='skip5'>5s ></button>
<button class='item' data-path='back30'>30s <</button>
<button class='item' data-path='skip30'>30s ></button>
<button class='item' data-path='back2m'>2m <</button>
<button class='item' data-path='skip2m'>2m ></button>
<button class='item' data-path='back15m'>15m <</button>
<button class='item' data-path='skip15m'>15m ></button>
</div>
<div class='full-width'>
<button class='item' data-path='playpause'>play/pause</button>
</div>
<script>
[].slice.call(document.getElementsByClassName('item')).map(i => {
i.onclick = async function (e) {
e.preventDefault();
const path = e.target.dataset.path
const response = await fetch(window.location.href + path)
if (response.status != 200) window.location.reload()
}
})
</script>
</body>
</html>