addEventListener('fetch', event => { event.respondWith(handleRequest(event.request)) }) const htmlPage = ` الخدمة متوقفة مؤقتًا
🚧

الخدمة متوقفة مؤقتًا

🕒 أوقات التشغيل: من 3 عصرًا إلى 4 فجرًا بتوقيت مكة

📍 يرجى المحاولة لاحقًا، نشكركم على تفهمكم

` async function handleRequest(request) { try { // محاولة جلب الصفحة من السيرفر الحقيقي const response = await fetch(request) return response } catch (err) { // في حال وجود خطأ (مثل 522) عرض الصفحة الاحتياطية return new Response(htmlPage, { status: 503, headers: { 'Content-Type': 'text/html; charset=utf-8' } }) } }