export default { async fetch(request) { const url = new URL(request.url); const targetUrl = url.searchParams.get("url"); const imageUrl = url.searchParams.get("img"); // Jika tidak ada parameter ?url & ?img, teruskan ke index.html asli (halaman generator) if (!targetUrl || !imageUrl) { return fetch(request); } const html = ` Play Video `; return new Response(html, { headers: { "content-type": "text/html;charset=UTF-8" }, }); }, }; function escapeHtml(str) { return str .replace(/&/g, "&") .replace(/"/g, """) .replace(/'/g, "'") .replace(//g, ">"); }