-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpopup.html
More file actions
201 lines (161 loc) · 4.13 KB
/
Copy pathpopup.html
File metadata and controls
201 lines (161 loc) · 4.13 KB
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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<style>
* { box-sizing: border-box; }
body {
font-family: Arial, sans-serif;
width: 380px;
padding: 12px;
margin: 0;
position: relative;
overflow: hidden;
color: #fff;
}
/* background layer */
body::before {
content: "";
position: fixed;
inset: 0;
background: url("icons/background.jpeg") center/cover no-repeat;
filter: blur(2px);
transform: scale(1.04);
z-index: -2;
}
/* dark glass overlay */
body::after {
content: "";
position: fixed;
inset: 0;
background: rgba(0,0,0,0.45);
backdrop-filter: blur(6px);
z-index: -1;
}
input:not([type="checkbox"]),
button {
width: 100%;
height: 34px;
padding: 6px 8px;
margin-bottom: 8px;
font-size: 14px;
}
button { cursor: pointer; }
.danger-button {
background: #a52828;
color: #fff;
border: 1px solid rgba(255,255,255,0.16);
}
.danger-button:hover {
background: #be3030;
}
.row {
display: flex;
gap: 8px;
margin-bottom: 8px;
}
.toggle {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 8px;
}
.settings {
display: none;
border-top: 1px solid #ccc;
padding-top: 8px;
margin-top: 8px;
}
.settings-subsection {
display: none;
margin-top: 10px;
padding-top: 8px;
border-top: 1px solid rgba(255,255,255,0.18);
}
.section-title {
font-size: 13px;
font-weight: bold;
margin: 6px 0 4px;
}
.spinner {
width: 22px;
height: 22px;
border: 3px solid #ddd;
border-top: 3px solid #333;
border-radius: 50%;
animation: spin 1s linear infinite;
display: none;
margin: 6px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error {
font-size: 12px;
color: #c00;
margin-bottom: 6px;
display: none;
}
.drop-zone {
width: 100%;
min-height: 56px;
padding: 10px;
margin-bottom: 8px;
border: 1px dashed rgba(255,255,255,0.45);
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
font-size: 13px;
background: rgba(255,255,255,0.05);
}
.drop-zone.active {
border-color: #4db8ff;
background: rgba(77,184,255,0.16);
}
#status {
font-size: 13px;
margin-bottom: 6px;
min-height: 18px;
}
</style>
</head>
<body>
<h3>Quick link</h3>
<button id="pickFile" type="button">Choose local file</button>
<input id="localFilePicker" type="file" accept="image/*,video/*,audio/*" hidden />
<div id="dropZone" class="drop-zone">Drop a local image, video, or audio file here</div>
<input id="input" placeholder="Paste source link…" />
<input id="output" placeholder="Result API link…" readonly />
<div id="spinner" class="spinner"></div>
<div id="status"></div>
<button id="get">GET</button>
<button id="toggleSettings">Settings</button>
<div id="settings" class="settings">
<div class="toggle">
<input type="checkbox" id="usePublic">
<label for="usePublic">Use public URL (tunnel)</label>
</div>
<div class="toggle" id="useLocalApiToggle">
<input type="checkbox" id="useLocalApi">
<label for="useLocalApi">Use local API for processing</label>
</div>
<div class="section-title">Local</div>
<div class="row">
<input id="localAddress" placeholder="127.0.0.1">
<input id="localPort" placeholder="8080">
</div>
<div class="section-title">Public</div>
<input id="globalUrl" placeholder="https://xxxx.trycloudflare.com">
<div id="globalError" class="error"></div>
<button id="refreshPublic">Refresh public URL</button>
<button id="toggleStreamingSettings" type="button">Streaming settings</button>
<div id="streamingSettingsSection" class="settings-subsection">
<div class="section-title">Streaming</div>
<label for="streamSegmentDuration">Segment duration (sec)</label>
<input id="streamSegmentDuration" type="number" min="1" step="1" inputmode="numeric" />
</div>
<button id="clearAllCache" type="button" class="danger-button">Clear all cache</button>
</div>
<script src="popup.js"></script>
</body>
</html>