-
Notifications
You must be signed in to change notification settings - Fork 2
/
popup.html
135 lines (135 loc) · 3.32 KB
/
popup.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
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
125
126
127
128
129
130
131
132
133
134
135
<!DOCTYPE html>
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<style>
* {
font-family: "Segoe UI";
font-size: 14px;
text-align: center;
outline: none;
}
hr {
border: 0.5px solid gray;
background: gray;
}
main {
width: 200px;
~width: 335px;
margin-left: -6px;
margin-right: -6px;
}
main > h1 {
color: #00B46E;
font-size: 34px;
font-family: "Edwardian Script ITC";
margin-bottom: 5px;
margin-top: 0px;
}
.switch {
position: relative;
display: block;
vertical-align: top;
width: 90%;
height: 30px;
padding: 3px;
margin: 3px;
background: linear-gradient(#E2E2E2, #E2E2E2 25px);
border-radius: 10px;
cursor: pointer;
}
.switch-input {
position: absolute;
top: 0;
left: 0;
opacity: 0;
}
.switch-label {
position: relative;
display: block;
height: inherit;
font-size: 11px;
background: #FF4141;
border-radius: inherit;
}
.switch-label:before, .switch-label:after {
position: absolute;
top: 50%;
margin-top: -.5em;
line-height: 1;
transition: inherit;
}
.switch-label:before {
content: attr(data-off);
right: 12px;
color: #FFFFFF;
text-shadow: 0 1px rgba(255, 255, 255, 0.6);
}
.switch-label:after {
content: attr(data-on);
left: 12px;
color: #FFFFFF;
text-shadow: 0 1px rgba(255, 255, 255, 0.6);
opacity: 0;
}
.switch-input:checked ~ .switch-label {
background: #00B46B;
}
.switch-input:checked ~ .switch-label:before {
opacity: 0;
}
.switch-input:checked ~ .switch-label:after {
opacity: 1;
}
.switch-handle {
position: absolute;
top: 4px;
left: 4px;
width: 20px;
height: 20px;
border-radius: inherit;
border: 4px solid white;
box-shadow: 1px 1px 5px rgba(0, 0, 0, 1);
}
.switch-handle:before {
content: "";
position: absolute;
top: 50%;
left: 50%;
margin: -6px 0 0 -6px;
width: 12px;
height: 12px;
background: linear-gradient(lightgreen, green);
border-radius: 6px;
}
.switch-input:checked ~ .switch-handle:before {
background: linear-gradient(red 40%, darkred);
}
.switch-input:checked ~ .switch-handle {
left: calc(100% - 32px);
box-shadow: -1px 1px 5px rgba(0, 0, 0, 1);
}
.switch-label, .switch-handle {
transition: All 0.5s ease;
}
</style>
</head>
<body>
<main>
<h1>YT-Nonstop</h1>
<hr/>
<settings>
<section>
Auto-skip to next video:
</br>
<label class="switch">
<input id="autoskip-toggle" class="switch-input" type="checkbox"/>
<span class="switch-label" data-on="ON" data-off="OFF"></span>
<span class="switch-handle"></span>
</label>
</section>
</settings>
</main>
</body>
<script src="popup.js"></script>
</html>