-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpopup.html
183 lines (179 loc) · 6.46 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
<!doctype html>
<html lang="en">
<head>
<title>Playback Rate Controller's Popup</title>
<style>
body {
font-size: 16px;
width: 170px;
height: 170px;
overflow: hidden;
padding: 10px 5px;
}
.hidden {
display: none;
}
.prc-short-message {
font-size: 14px;
color: #cf3839;
padding-top: 15px;
text-align: center;
}
.prc-top-controls {
display: flex;
}
.prc-top-controls-rate {
flex-grow: 1;
text-align: center;
line-height: 0.95em;
padding-top:7px;
color:#467DB3;
}
.prc-control-btn {
padding: 3px 10px;
cursor: pointer;
border-radius: 4px;
border: 1px solid #aaa;
background: #eee;
}
.prc-control-btn:focus {
outline: -webkit-focus-ring-color auto 0;
}
.prc-control-faster-slower-btn {
height: 40px;
width: 40px;
font-size: 24px;
line-height: 1em;
font-weight: bold;
box-shadow: inset 0 1px 0 rgba(255,255,255,0.4),1px 1px 2px rgba(0,0,0,0.2);
color: white;
font-family: "Lucida Console", Monaco, monospace;
}
.prc-control-faster-slower-btn > span {
position: relative;
top: -2px;
}
#prc-slower {
background: linear-gradient(to bottom, #B1E613 0%, #7CBC08 100%);
border-color: #8EAC27;
}
#prc-faster {
background: linear-gradient(to bottom, #F14545 0%, #CE1B23 100%);
border-color: #B5191D;
}
.prc-control-rate {
display: inline-block;
font-size: 22px;
width: 50px;
text-align: center;
}
.prc-control-rate-label {
font-size: 9px;
}
.prc-extra-controls {
display: flex;
padding-top: 20px;
}
.prc-extra-controls-normal {
flex-grow: 1;
padding: 0 10px;
}
.prc-control-rate-btn {
border-radius: 3px;
font-size: 10px;
width: 100%;
padding: 12px 5px 8px 5px;
border: 1px solid #ccc;
background-color: #f0f0f0;
color: #999;
font-weight: bold;
transition: background .5s, color .5s;
}
.prc-control-rate-btn:hover {
color:#333;
background-color: #f5f5f5;
transition: background .5s, color .5s;
}
#prc-rate-1 {
padding: 30px 5px;
font-size: 13px;
}
.prc-extra-controls-slow-top, .prc-extra-controls-fast-top {
padding-bottom: 10px;
}
.icon {
display: inline-block;
width: 1em;
height: 1em;
fill: currentColor;
}
.icon-wondering {
font-size: 64px;
}
.prc-short-message .icon-wondering {
margin-bottom: 10px;
}
.prc-controls-slider {
padding-top: 15px;
}
.prc-controls-slider input {
width: 100%;
}
</style>
<script src="popup.js"></script>
</head>
<body>
<div id="prc-popup-no-content">
<div class="prc-short-message">
<svg style="position: absolute; width: 0; height: 0;" width="0" height="0" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<symbol id="icon-wondering" viewBox="0 0 1024 1024">
<title>wondering</title>
<path class="path1" d="M512 1024c282.77 0 512-229.23 512-512s-229.23-512-512-512-512 229.23-512 512 229.23 512 512 512zM512 96c229.75 0 416 186.25 416 416s-186.25 416-416 416-416-186.25-416-416 186.25-416 416-416zM745.74 601.62l22.488 76.776-437.008 128.002-22.488-76.776zM256 320c0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64s-64-28.654-64-64zM640 320c0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64s-64-28.654-64-64z"></path>
</symbol>
</defs>
</svg>
<div><svg class="icon icon-wondering"><use xlink:href="#icon-wondering"></use></svg></div>
<div>No audio/video content found on this page.</div>
</div>
</div>
<div id="prc-popup-content" class="hidden">
<div class="prc-top-controls">
<div class="prc-top-controls-slower">
<button id="prc-slower" class="prc-control-btn prc-control-faster-slower-btn"><span>-</span></button>
</div>
<div class="prc-top-controls-rate">
<span id="prc-rate" class="prc-control-rate"></span><br>
<span class="prc-control-rate-label">Playback Rate</span>
</div>
<div class="prc-top-controls-faster">
<button id="prc-faster" class="prc-control-btn prc-control-faster-slower-btn" autofocus><span>+</span></button>
</div>
</div>
<div class="prc-extra-controls">
<div class="prc-extra-controls-slow">
<div class="prc-extra-controls-slow-top">
<button id="prc-rate-05" class="prc-control-btn prc-control-rate-btn"> 0.5x </button>
</div>
<div class="prc-extra-controls-slow-bottom">
<button id="prc-rate-08" class="prc-control-btn prc-control-rate-btn"> 0.8x </button>
</div>
</div>
<div class="prc-extra-controls-normal">
<button id="prc-rate-1" class="prc-control-btn prc-control-rate-btn"> 1.0x </button>
</div>
<div class="prc-extra-controls-fast">
<div class="prc-extra-controls-fast-top">
<button id="prc-rate-15" class="prc-control-btn prc-control-rate-btn"> 1.5x </button>
</div>
<div class="prc-extra-controls-fast-bottom">
<button id="prc-rate-2" class="prc-control-btn prc-control-rate-btn"> 2.0x </button>
</div>
</div>
</div>
<div class="prc-controls-slider">
<input id="prc-rate-slider" type="range" min="0.1" max="6" value="1" step=".1">
</div>
</div>
</body>
</html>