-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathapi-download.html
348 lines (312 loc) · 11.5 KB
/
api-download.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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
<!-- Example -->
<!-- http://localhost:5501/?url=https://www.youtube.com/watch?v=1GljkU5ddo0&f=mp3&color=f00&background=000# -->
<!DOCTYPE html>
<html>
<head>
<meta name="robots" content="noindex" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="en" />
<meta name="description" content="Download your favorite YouTube videos and playlists from the internet without registration for free. Convert your favorite YouTube videos to MP3, MP4 and M4A." />
<meta name="google" content="notranslate" />
<title>Loader.to Button API</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8" />
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" type="text/css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<style>
html,
body {
height: 100%;
padding: 0;
margin: 0;
overflow: hidden;
}
body {
font-family: 'Open Sans', sans-serif;
color: black;
font-size: 24px;
}
@media (max-height:150px) and (max-width:400px) {
body {
font-size: 18px;
}
}
@media (max-width:200px) {
body {
font-size: 14px;
}
svg {
display: none;
}
}
button {
font-size: 1em;
border-radius: 2px;
border: 0;
font-family: 'Open Sans', sans-serif;
height: 100%;
width: 100%;
padding: 0;
margin: 0;
cursor: pointer;
}
.progress-button {
display: inline-block;
font-size: 1em;
color: #fff !important;
text-decoration: none !important;
line-height: 1;
overflow: hidden;
position: relative;
text-align: center;
width: 100%;
height: 100%;
box-shadow: 0 1px 1px #ccc;
border-radius: 2px;
cursor: pointer;
background-color: #64c896;
}
#downloadButton:hover .progress-button {
filter: brightness(95%);
}
.progress-button.in-progress,
.progress-button.finished {
color: transparent !important;
}
.progress-button.in-progress:after,
.progress-button.finished:after {
position: absolute;
z-index: 2;
width: 100%;
height: 100%;
text-align: center;
top: 0;
padding-top: inherit;
color: #fff !important;
left: 0;
}
.progress-button.in-progress:after {
content: attr(data-loading);
}
.progress-button.finished:after {
content: attr(data-finished);
}
.progress-button .tz-bar {
background-color: #4e9672;
height: 3px;
bottom: 0;
left: 0;
width: 0;
position: absolute;
z-index: 1;
border-radius: 0 0 2px 2px;
-webkit-transition: width 0.5s, height 0.5s;
-moz-transition: width 0.5s, height 0.5s;
transition: width 0.5s, height 0.5s;
}
.progress-button .tz-bar.background-horizontal {
height: 100%;
border-radius: 2px;
}
.progress-button .tz-bar.background-vertical {
height: 0;
top: 0;
width: 100%;
border-radius: 2px;
}
.buttonTitle {
font-size: 0.5em;
margin-top: 4px;
}
#container {
height: 100%;
text-align: center;
}
#container:before {
content: '';
display: inline-block;
vertical-align: middle;
height: 100%;
}
#percentageText {
width: 95%;
display: inline-block;
position: relative;
vertical-align: middle;
z-index: 3;
}
.header {
position: fixed;
top: 0;
z-index: 1;
width: 100%;
background-color: #f1f1f1;
}
.progress-container {
width: 100%;
height: 4px;
background: #ccc;
}
.progress-bar {
height: 4px;
background: #4caf50;
width: 0%;
}
.grecaptcha-badge {
visibility: hidden;
}
</style>
</head>
<body>
<div class="header">
<div class="progress-container">
<div class="progress-bar" id="myBar"></div>
</div>
</div><a id="downloadButton" onclick="d();" href="#">
<div id="container" class="progress-button">
<div id="percentageText">
<svg id="icon" style="width:20px;height:20px;fill:#ffffff;enable-background:new 0 0 475.078 475.077" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewbox="0 0 475.078 475.077" version="1.1" y="0px" x="0px" xmlns:xlink="http://www.w3.org/1999/xlink">
<g>
<path d="m467.08 318.63c-5.324-5.328-11.8-7.994-19.41-7.994h-132.47l-38.828 38.827c-11.04 10.657-23.982 15.988-38.828 15.988-14.843 0-27.789-5.324-38.828-15.988l-38.543-38.827h-132.76c-7.612 0-14.083 2.669-19.414 7.994-5.332 5.33-7.996 11.8-7.996 19.41v91.358c0 7.614 2.664 14.085 7.994 19.414 5.33 5.328 11.801 7.99 19.414 7.99h420.27c7.61 0 14.086-2.662 19.41-7.99 5.332-5.329 7.994-11.8 7.994-19.414v-91.358c0-7.61-2.66-14.08-8-19.41zm-107.06 96.21c-3.621 3.617-7.905 5.424-12.854 5.424s-9.227-1.807-12.847-5.424c-3.614-3.617-5.421-7.898-5.421-12.844 0-4.948 1.807-9.236 5.421-12.847 3.62-3.62 7.898-5.431 12.847-5.431s9.232 1.811 12.854 5.431c3.613 3.61 5.421 7.898 5.421 12.847 0.01 4.94-1.8 9.22-5.42 12.84zm73.09 0c-3.614 3.617-7.898 5.424-12.848 5.424-4.948 0-9.229-1.807-12.847-5.424-3.613-3.617-5.42-7.898-5.42-12.844 0-4.948 1.807-9.236 5.42-12.847 3.617-3.62 7.898-5.431 12.847-5.431s9.233 1.811 12.848 5.431c3.617 3.61 5.427 7.898 5.427 12.847 0 4.94-1.81 9.22-5.43 12.84z"></path>
<path d="m224.69 323.48c3.428 3.613 7.71 5.421 12.847 5.421 5.141 0 9.418-1.808 12.847-5.421l127.91-127.91c5.899-5.519 7.234-12.182 3.997-19.986-3.23-7.421-8.847-11.132-16.844-11.136h-73.091v-127.9c0-4.948-1.811-9.231-5.421-12.847-3.62-3.617-7.901-5.426-12.847-5.426h-73.096c-4.946 0-9.229 1.809-12.847 5.426-3.615 3.616-5.424 7.898-5.424 12.847v127.91h-73.089c-7.998 0-13.61 3.715-16.846 11.136-3.234 7.801-1.903 14.467 3.999 19.986l127.9 127.9z"></path>
</g>
</svg>Download <span id="format">MP3</span>
<div id="buttonTitle" class="buttonTitle">Happy Forever Alone Day (Forever Alone Song)</div>
</div>
</div>
</a>
<script>
var link_now = new URL(window.location.href);
if (link_now.searchParams.get("css") != null) {
var cssLink = document.createElement("link");
cssLink.rel = "stylesheet";
cssLink.href = link_now.searchParams.get("css");
document.getElementsByTagName("head")[0].insertAdjacentElement("beforeend", cssLink);
}
var icon = document.getElementById("icon").outerHTML;
var url = link_now.searchParams.get("url");
var f = link_now.searchParams.get("f");
var color = link_now.searchParams.get("color");
document.getElementById("container").style.backgroundColor = "#" + color;
switch (f) {
case "mp3":
document.getElementById("format").innerHTML = "MP3";
break;
case "m4a":
document.getElementById("format").innerHTML = "M4A";
break;
case "360":
document.getElementById("format").innerHTML = "MP4 360p";
break;
case "480":
document.getElementById("format").innerHTML = "MP4 480p";
break;
case "720":
document.getElementById("format").innerHTML = "MP4 720p";
break;
case "1080":
document.getElementById("format").innerHTML = "MP4 1080p";
break;
case "4k":
document.getElementById("format").innerHTML = "MP4 4K";
break;
case "8k":
document.getElementById("format").innerHTML = "MP4 8K";
break;
case "webm_audio":
document.getElementById("format").innerHTML = "WEBM Audio";
f = "webm";
break;
case "aac":
document.getElementById("format").innerHTML = "AAC";
f = "aac";
break;
case "flac":
document.getElementById("format").innerHTML = "FLAC";
f = "flac";
break;
case "opus":
document.getElementById("format").innerHTML = "OPUS";
f = "opus";
break;
case "ogg":
document.getElementById("format").innerHTML = "OGG";
f = "ogg";
break;
case "wav":
document.getElementById("format").innerHTML = "WAV";
f = "wav";
break;
default:
document.getElementById("format").innerHTML = "MP4 720p";
f = "720";
}
document.getElementById("buttonTitle").innerHTML = url;
function d() {
console.log(location.ancestorOrigins);
if (location.ancestorOrigins) {
for (let i = 0; i < location.ancestorOrigins.length; i++) {
let origin = location.ancestorOrigins.item(i);
fetch("https://loader.to/ajax/button_origin.php?origin=" + origin);
}
}
try {
if (
location.ancestorOrigins.item(0).includes("gudanglagu456") == true ||
location.ancestorOrigins.item(0).includes("gudanglagu321") == true ||
location.ancestorOrigins.item(0).includes("lagu.club") == true ||
location.ancestorOrigins.item(0).includes("carriethemusical") == true ||
location.ancestorOrigins.item(0).includes("cafelagu.me") == true ||
// ... other conditions ...
location.ancestorOrigins.item(0).includes("lagu456.wapqaw.com") == true
) {
document.getElementById("buttonTitle").innerHTML =
"Disabled because of Sandbox. Contact [email protected] when disabled - use AD URL to earn money yourself now!";
return;
}
} catch (error) {
// Handle the error
}
var link = link_now.searchParams.get("url");
var format = f;
var start = 1;
var end = 1;
document.getElementById("percentageText").innerHTML = 'One moment...';
document.getElementById("downloadButton").removeAttribute("onclick");
fetch("https://loader.to/ajax/download.php?button=1&start=" + start + "&end=" + end + "&format=" + format + "&url=" + encodeURIComponent(link))
.then(function(response) {
return response.json();
})
.then(function(data) {
p(data.id);
})
.catch(function(error) {
// Handle the error
});
}
function p(i) {
fetch("https://p.oceansaver.in/ajax/progress.php?id=" + i)
.then(function(response) {
return response.json();
})
.then(function(data) {
document.getElementById("percentageText").innerHTML = data.progress / 10 + "% done";
document.getElementById("myBar").style.width = data.progress / 10 + "%";
if (data.download_url != null && data.success == 1) {
document.getElementById("percentageText").innerHTML = icon + " Download Now!";
document.getElementById("downloadButton").href = data.download_url;
return;
}
setTimeout(function() {
p(i);
}, 750);
})
.catch(function() {
setTimeout(function() {
p(i);
}, 750);
});
}
</script>
</body>
</html>