-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpopup.html
143 lines (127 loc) · 3.6 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
136
137
138
139
140
141
142
<!DOCTYPE html>
<html>
<head>
<title>YouTube Grid Settings</title>
<style>
body {
width: 300px;
height: 200px;
display: flex;
flex-direction: column;
justify-content: space-around;
padding: 10px;
background: #000000;
background: -webkit-linear-gradient(0deg, #000000 0%, #512126 50%, #ec3636 100%);
background: linear-gradient(0deg, #000000 0%, #512126 50%, #ec3636 100%);
margin: 0;
overflow: hidden;
color: #ccc;
font-size: 1rem;
font-weight: 600;
}
label {
display: flex;
align-items: center;
justify-content: space-around;
font-size: 1.3rem;
color: #000000;
}
input[type="range"] {
-webkit-appearance: none;
width: 100%;
height: 6px;
background: #4CAF50;
border-radius: 5px;
cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
width: 20px;
height: 20px;
background: #ec3636;
border-radius: 50%;
cursor: pointer;
position: relative;
z-index: 1;
}
.toggle-switch {
display: inline-block;
position: relative;
width: 50px;
height: 24px;
}
.toggle-switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #000000;
transition: .4s;
border-radius: 24px;
}
.slider:before {
position: absolute;
content: "";
height: 16px;
width: 16px;
border-radius: 50%;
left: 4px;
bottom: 4px;
background-color: #ec3636;
transition: .4s;
}
input:checked + .slider {
background-color: #4CAF50;
}
input:checked + .slider:before {
transform: translateX(26px);
}
.container {
display: flex;
flex-direction: column;
align-items: center;
padding: .5rem;
gap: 1rem;
}
.container-range {
display: flex;
width: 100%;
align-items: center;
}
a {
font-size: .8rem;
text-align: center;
color: #ec3636;
text-decoration: none;
}
</style>
</head>
<body>
<label>
<div class="toggle-switch">
<input type="checkbox" id="enableExtension">
<span class="slider"></span>
</div>
Enable Extension
</label>
<div>
<div class="container">
<span>Video Preview Width: <span id="widthValue"></span>px</span>
<div class="container-range">
<span>200</span>
<input type="range" id="widthSlider" min="200" max="800" step="10">
<span>800</span>
</div>
</div>
</div>
<a href="https://github.com/SheeetFace/youtube-grid-home-extension" target="_blank">You can thank me by simply putting a STAR on GitHub</a>
<script src="popup.js"></script>
</body>
</html>