(function () { try { console.log("[InjectDiv] Script started."); const targets = [ { match: "c1874545575", id: "injected-block-first", html: `
` }, { match: "c715319738", id: "injected-block-second", html: `

الصناديق

لوحة الأم

المعالجات

كروت الشاشة

الذاكرة العشوائية

وحدة التخزين

المبردات

المراوح

مزود الطاقة

وحدة التخزين (HDD)

<----------------!------------------>

التخفيضات

` } ]; const target = targets.find(t => window.location.href.includes(t.match)); if (!target) { console.log("[InjectDiv] No matching target for this URL:", window.location.href); return; } console.log("[InjectDiv] Target matched:", target.id); function createDiv() { const div = document.createElement("div"); div.className = "custom-injected-block"; div.id = target.id; div.innerHTML = target.html; return div; } function inject(div) { const appInner = document.querySelector(".app-inner"); if (appInner) { console.log("[InjectDiv] .app-inner found."); const footer = appInner.querySelector("footer") || document.querySelector("footer") || document.querySelector(".footer"); if (footer && footer.parentNode) { footer.parentNode.insertBefore(div, footer); console.log("[InjectDiv] Div inserted before footer."); } else { appInner.appendChild(div); console.log("[InjectDiv] Div appended to end of .app-inner."); } return true; } return false; } const divToInject = createDiv(); if (!inject(divToInject)) { console.log("[InjectDiv] .app-inner not found immediately, starting MutationObserver."); const observer = new MutationObserver((mutations, obs) => { if (inject(divToInject)) { console.log("[InjectDiv] Div injected via MutationObserver."); obs.disconnect(); } }); observer.observe(document.body || document.documentElement, { childList: true, subtree: true }); setTimeout(() => { if (!document.getElementById(divToInject.id)) { console.warn("[InjectDiv] Timeout: .app-inner still not found after 8s."); observer.disconnect(); } }, 8000); } } catch (e) { console.error("[InjectDiv] Top-level error:", e); } })();