Edit: animasu
Nama Worker
Kode Sumber
--0d84b1d340615d3ee49dceefa286a8b4c1661841194f891edc663da16f81 Content-Disposition: form-data; name="worker.js" // ================= KONFIGURASI (EDIT BAGIAN INI SAJA) ================= const CONFIG = { // Website Target (Jangan diubah) upstream: "https://nonton.cahyokntl.site", // 1. Custom Title (Judul di Tab Browser) title: "Bukan Ariv :)", // 2. Custom Logo (Merah & Putih) logo: { red: "Ariv", // Bagian warna MERAH (Pengganti 'Cahyo') white: "Ganteng" // Bagian warna PUTIH (Pengganti 'Kntl') }, // 3. Custom Link Telegram links: { channel1: "https://t.me/BabangAriv86", // Ganti link Channel 1 channel2: "https://t.me/InvisibleHuman77", // Ganti link Channel 2 admin: "https://who.ariv.biz.id/ :)" // Ganti link Admin } }; // ================= BATAS KONFIGURASI ================= export default { async fetch(request) { const url = new URL(request.url); const path = url.pathname; // Aset Statis (Gambar, CSS, JS) -> Langsung pass-through agar UI 100% Asli if (path.match(/\.(css|js|png|jpg|jpeg|gif|svg|webp|ico|woff|woff2|ttf|otf)$/) || path.startsWith('/assets/')) { return proxyAsset(request); } // Halaman HTML -> Ambil, Edit Teks, Kirim return proxyPage(request, url); } }; async function proxyPage(request, url) { const targetUrl = CONFIG.upstream + url.pathname + url.search; const response = await fetch(targetUrl, { headers: { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", "Referer": CONFIG.upstream } }); if (!response.ok) return response; let text = await response.text(); // === BAGIAN EDIT HTML === // 1. GANTI TITLE BROWSER text = text.replace(/<title>.*?<\/title>/g, `<title>${CONFIG.title}</title>`); // 2. GANTI LOGO (MERAH & PUTIH) const newLogoHTML = `<div class="logo"><span>${CONFIG.logo.red}</span><span>${CONFIG.logo.white}</span></div>`; // Replace Struktur Lengkap text = text.replace( /<div class="logo"><span>Cahyo<\/span><span>Kntl<\/span><\/div>/g, newLogoHTML ); // Replace Fallback text = text.replace( /<span>Cahyo<\/span><span>Kntl<\/span>/g, `<span>${CONFIG.logo.red}</span><span>${CONFIG.logo.white}</span>` ); // 3. GANTI LINK TELEGRAM text = text.replaceAll("https://t.me/autoscript_willstore69", CONFIG.links.channel1); text = text.replaceAll("https://t.me/ngemod_in", CONFIG.links.channel2); text = text.replaceAll("https://t.me/user_legend", CONFIG.links.admin); // 4. BERSIHKAN LINK ASLI & BASE TAG text = text.replaceAll(CONFIG.upstream, ""); text = text.replace(/<base[^>]*>/gi, ""); // 5. === INJECT FOOTER MEWAH === // Kita selipkan footer sebelum tag penutup </body> // Style padding-bottom: 90px agar tidak tertutup menu navigasi bawah const footerHTML = ` <div style="text-align: center; padding: 20px; padding-bottom: 90px; margin-top: 20px; color: #888; font-size: 0.9em; border-top: 1px solid #222;"> © 2025 Created By <span style="color: #e50914; font-weight: bold; text-transform: uppercase; letter-spacing: 1px;">Bang Ariv</span> </div> `; text = text.replace("</body>", footerHTML + "</body>"); // === SELESAI EDIT === const newHeaders = new Headers(response.headers); newHeaders.delete("content-security-policy"); newHeaders.delete("x-frame-options"); newHeaders.set("content-type", "text/html; charset=utf-8"); return new Response(text, { status: response.status, headers: newHeaders }); } async function proxyAsset(request) { const url = new URL(request.url); const targetUrl = CONFIG.upstream + url.pathname + url.search; const response = await fetch(targetUrl, { headers: request.headers }); const newHeaders = new Headers(response.headers); newHeaders.delete("content-security-policy"); newHeaders.delete("x-frame-options"); return new Response(response.body, { status: response.status, headers: newHeaders }); } --0d84b1d340615d3ee49dceefa286a8b4c1661841194f891edc663da16f81--
Bindings
Tambah KV
Tambah R2
Tambah D1
← Kembali
Simpan & Deploy
Hapus Script Worker Ini