-
Notifications
You must be signed in to change notification settings - Fork 0
/
popup.html
267 lines (234 loc) · 7.82 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
<!DOCTYPE html>
<html>
<head>
<title>Video Control Status</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
color: #333;
min-width: 300px;
}
.header {
background-color: #446dab;
color: white;
padding: 12px 15px;
border-radius: 3px 3px 0 0;
font-size: 16px;
}
.content {
padding: 20px;
text-align: left;
}
.shortcuts-info {
background-color: #ffffff;
border: 1px solid #ddd;
padding: 15px;
border-radius: 5px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
margin-top: 1em;
margin-bottom: 1em;
}
.shortcuts-info p {
margin-top: 0;
color: #555;
font-size: 14px;
}
.shortcuts-info ul {
list-style: none;
padding: 0;
margin: 10px 0 0;
}
.shortcuts-info li {
margin-bottom: 10px;
font-size: 14px;
}
.shortcut-key {
background-color: #e7e9ed;
color: #333;
font-family: monospace;
padding: 3px 6px;
border-radius: 4px;
font-weight: 600;
}
.status {
padding: 10px;
margin-bottom: 15px;
border-radius: 3px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.active {
background-color: #e1f5fe;
/* Light blue background for active status */
color: #0277bd;
/* Darker blue for the text */
border: 1px solid #b3e5fc;
}
.status-playing {
background-color: #e1f5fe;
/* Light greenish background for playing status */
color: #0277bd;
/* Darker greenish text */
}
.status-paused {
background-color: #f8d7da;
/* Light reddish background for paused status */
color: #721c24;
/* Darker reddish text */
}
#playIcon,
#pauseIcon {
display: none;
}
.status-playing~.buttons-container #pauseIcon {
display: block;
}
.status-paused~.buttons-container #playIcon {
display: block;
}
.inactive {
background-color: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
}
.footer {
font-size: 0.9em;
text-align: center;
color: #666;
padding: 15px 20px;
border-top: 1px solid #ddd;
background: #fafafa;
border-radius: 0 0 3px 3px;
}
.shortcut-description {
font-size: 0.95em;
line-height: 1.4;
margin-top: 5px;
}
.control-button {
background: none;
border: none;
cursor: pointer;
padding: 5px;
margin: 2px;
}
.control-button svg {
fill: #446dab;
height: 20px;
width: 20px;
}
.button {
background-color: #4CAF50;
/* Green background */
color: white;
/* White text */
border: none;
padding: 0.5em 1em;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 11px;
margin: 4px 2px;
transition-duration: 0.4s;
cursor: pointer;
border-radius: 5px;
/* Rounded corners */
box-sizing: border-box;
border: 1px solid #4CAF50;
}
.button:hover {
background-color: white;
color: #4CAF50;
}
.buttons-container {
display: flex;
justify-content: space-between;
}
</style>
</head>
<body>
<div class="header">Video Control Status</div>
<!-- ... existing code ... -->
<div class="content">
<div id="status" class="status inactive">Checking status...</div>
<div class="buttons-container">
<button id="playPauseButton" class="control-button" title="Play/Pause">
<!-- Combined SVG for Play and Pause Icons -->
<svg viewBox="0 0 24 24">
<!-- Play Icon (Initially visible) -->
<path d="M8 5v14l11-7z" id="playIcon" />
<!-- Pause Icon (Initially hidden) -->
<g id="pauseIcon">
<rect x="6" y="5" width="4" height="14" />
<rect x="14" y="5" width="4" height="14" />
</g>
</svg>
</button>
<button id="speedDown" class="control-button" title="Slow down">
<svg viewBox="0 0 24 24">
<path d="M20 18l-8.5-6L20 6v12zM10 6H8v12h2z" />
<path d="M10 18l-8.5-6L10 6v12z" />
</svg>
</button>
<!-- Rewind Button -->
<button id="rewindButton" class="control-button" title="Rewind 10s">
<!-- SVG for Skip back Icon -->
<svg viewBox="0 0 24 24">
<path d="M20 18l-8.5-6L20 6v12zM10 6H8v12h2z" />
</svg>
</button>
<!-- Skip Ahead Button -->
<button id="skipAheadButton" class="control-button" title="Forward 10s">
<!-- SVG for skip ahead Icon -->
<svg viewBox="0 0 24 24">
<path d="M4 18l8.5-6L4 6v12zM14 6h2v12h-2z" />
</svg>
</button>
<button id="speedUp" class="control-button" title="Speed up">
<svg viewBox="0 0 24 24">
<path d="M4 18l8.5-6L4 6v12zM14 6h2v12h-2z" />
<path d="M14 18l8.5-6L14 6v12z" />
</svg>
</button>
</div>
<div class="buttons-container">
<button class="check-video-button button" id="checkVideoButton" title="Refreshes status of the video">Check
Video Status
</button>
</div>
<!-- Shortcuts Info -->
<div class="shortcuts-info">
<p>Maximize your viewing experience with these keyboard shortcuts:</p>
<ul>
<li><span class="shortcut-key">⌥/Alt</span> + <span class="shortcut-key">→</span>: Skip
Forward 30
seconds</li>
<li><span class="shortcut-key">⌥/Alt</span> + <span class="shortcut-key">←</span>: Rewind 30
seconds
</li>
<li><span class="shortcut-key">⌥/Alt</span> + <span class="shortcut-key">P</span>: Previous
Episode
</li>
<li><span class="shortcut-key">⌥/Alt</span> + <span class="shortcut-key">N</span>: Next Episode
</li>
</ul>
</div>
<div class="buttons-container">
<button class="button" id="configurePrevButton"
title="Select the element you want clicked when you press Alt/Opt + P">
Configure Previous Episode
</button>
<button class="button" id="configureNextButton"
title="Select the element you want clicked when you press Alt/Opt + N">
Configure Next Episode
</button>
</div>
<h4>
Pssst... We will also resume your videos from your last saved position!
</h4>
</div>
<script src="popup.js"></script>
</body>
</html>