-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathp.html
248 lines (201 loc) · 7.98 KB
/
p.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ipul tampan</title>
<!-- Materialize CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<link rel="stylesheet" href="global.css">
<script src="config.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
</head>
<body>
<!-- Navbar -->
<h5 class="black darken-3 white-text z-depth-3"
style="margin-top: 0px; padding: 5px; text-align: center;">
Dion GANTENG
</h5>
<div class="container">
<a href="index.html"
class="btn waves waves-effect pink"
>kembali</a>
<a href="cari.html"
class="btn waves waves-effect purple"
>Cari Video</a>
<a href="chat.html"
class="btn waves waves-effect blue"
>Request</a>
</div>
<div class="container">
<a href="simpan.html"
class="btn waves waves-effect blue"
>Video tersimpan</a>
</div>
<div id="loadingframe" style="display: block;">
<h6 style="text-align: center;font-weight: bold;"> Sedang Mencari Video bentar bos...</h6>
</div>
<!-- Iframe -->
<iframe id="myIframe" src="" frameborder="0"
style="width:100%;height: 330px;margin-top: 10px;"
allowfullscreen
allowscrolling="no"
onload="hideLoadingFrame()"
></iframe>
<div class="container" style="margin-top: 10px">
<p class="pink-text bold-text">
<span
class="btn waves waves-effect pink"
>cara nonton: </span>
pastikan lu pake Chrome . jangan nonton di browser laen , facebook atau yg laen laen . copas link ke chrome nonton di chrome . kalo udah di chrome. cara nonton nya setiap lu play video kalo kebuka web iklan lu back aja . Tombol back dari hp lu biar balik lagi ke web b0cep ini lagi . begitu trus sampe lu tonton .
</p>
<a target="_blank" id="urldownload"
style="width:100%"
class="btn waves waves-effect pink bold-text"
>Download Video </a>
<p class="center-align bold-text red-text">Lewatin Iklan shortlink kalo mau Download Video</p>
<!-- <a
target="_blank"
style="width: 100%"
class="btn waves waves-effect purple bold-text"
id="downloadseribu">Download Tanpa Iklan Bayar 1000</a>
<p class="center-align bold-text pink-text">
Chat Admin Jika Pembayaran Link Error , di tombol Request
</p>
-->
</div>
<div class="container">
<h5 class="bold-text">Video Lainnya </h5>
</div>
<!-- RELATED -->
<div id="preloader" style="margin-top:30px">
<div style="display: flex;justify-content: center;">
<div class="preloader-wrapper big active">
<div class="spinner-layer spinner-red-only">
<div class="circle-clipper left">
<div class="circle"></div>
</div><div class="gap-patch">
<div class="circle"></div>
</div><div class="circle-clipper right">
<div class="circle"></div>
</div>
</div>
</div>
</div>
<h6 style="font-weight: bold;text-align: center;">Sedang Mencari Video... <br>Refresh Web kalo lama</h6>
</div>
<div style="margin-top:10px">
<div class="row" id="cards-container">
<!-- Cards will be inserted here dynamically -->
</div>
</div>
<!-- Import jQuery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<!-- Import Materialize JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<script>
function hideLoadingFrame() {
const loadingFrame = document.getElementById('loadingframe');
loadingFrame.style.display = 'none';
}
// Fungsi untuk mengambil nilai id dari URL
function getUrlParameter(name) {
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
var regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
var results = regex.exec(location.search);
return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
}
// Mengambil nilai id dari URL
var id = getUrlParameter('id');
// Mengganti src dari iframe dengan nilai id
if (id) {
var iframe = document.getElementById('myIframe');
var download_url = document.getElementById('urldownload');
// var downloadseribu = document.getElementById('downloadseribu');
iframe.src = frame_domain + "/e/" + id;
let down_url = frame_domain + "/d/" + id
download_url.href = shortlink_domain + shortlink_token + shortlink_tujuan + down_url ;
// downloadseribu.href = `${midtrans_payment}?finish_url=${encodeURIComponent(down_url)}&gross_amount=1000`
}
const apiUrl = 'https://doodapi.com/api/file/list';
function togglePreloader(show) {
const preloader = document.getElementById('preloader');
if (show) {
preloader.style.display = 'block';
} else {
preloader.style.display = 'none';
}
}
// Function to truncate text
function truncateText(text, maxLength) {
return text.length > maxLength ? text.substring(0, maxLength) + '...' : text;
}
// Function to fetch data from API
function fetchData(page) {
fetch(`${cors_any}/${apiUrl}?key=${key_api}&page=${page}`)
.then(response => response.json())
.then(data => {
if (data.msg === "OK") {
togglePreloader(false);
const files = data.result.files;
const container = document.getElementById('cards-container');
container.innerHTML = ''; // Clear previous cards
files.forEach(file => {
const truncatedTitle = truncateText(file.title, 40);
const cardHtml = `
<div class="col s6 m3 l3">
<div class="card waves waves-effect">
<div >
<img
style="width:100%"
src="${file.single_img}" alt="${file.title}">
</div>
<div class="container">
<span class="pink-text darken-3 bold-text">${truncatedTitle}</span>
</div>
<div style="display:flex;justify-content:space-between;margin:5px">
<button onclick="savelocal('${encodeURIComponent(JSON.stringify(file))}')" class="btn waves waves-effect blue">Simpan</button>
<button onclick="openvideo('${file.file_code}')" class="btn waves waves-effect pink">Nonton</button>
</div>
</div>
</div>
`;
container.innerHTML += cardHtml;
});
}
})
.catch(error => {
togglePreloader(false);
Swal.fire({
icon: 'error',
title: 'Gagal Dapat Video',
text: 'Coba Lu Refresh , kalo masih lama loading / error berarti server error tungguin aja ntar di benerin',
});
console.error('Error fetching data:', error);
});
}
// Fetch initial data to get total pages
fetch(`${cors_any}/${apiUrl}?key=${key_api}`)
.then(response => response.json())
.then(data => {
if (data.msg === "OK") {
const totalPages = data.result.total_pages;
const randomPage = Math.floor(Math.random() * totalPages) + 1;
fetchData(randomPage);
}
})
.catch(error => {
console.error('Error fetching data:', error);
});
function openvideo(code){
let random_pilih = direct_click(code)
}
// Add this script at the end of your body tag or in a separate script file
var link = document.getElementById('myLink');
link.href = "/p.html?id=" + id ;
link.textContent = window.location.hostname + "/p.html?id=" + id ;
</script>
<div style="margin-top:50px">
</div>
</body>
</html>