Spaces:
Running
Running
Upload index.html with huggingface_hub
Browse files- index.html +25 -0
index.html
CHANGED
|
@@ -44,6 +44,31 @@
|
|
| 44 |
</style>
|
| 45 |
</head>
|
| 46 |
<body>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
<nav class="navbar">
|
| 48 |
<div class="logo" onclick="navigateTo('')">Innovation Hub</div>
|
| 49 |
<div class="nav-links"><div onclick="navigateTo('')">🏠 Home Feed</div></div>
|
|
|
|
| 44 |
</style>
|
| 45 |
</head>
|
| 46 |
<body>
|
| 47 |
+
|
| 48 |
+
<div id="central-top-zone" style="text-align: center; margin: 0 auto; width: 100%; min-height: 10px;"></div>
|
| 49 |
+
<script>
|
| 50 |
+
document.addEventListener("DOMContentLoaded", function() {
|
| 51 |
+
const currentSite = window.location.hostname;
|
| 52 |
+
// جلب الإعلانات من سيرفر الإدارة
|
| 53 |
+
fetch('https://eslammsd-eslam-manager-bot.hf.space/ads_config.json?cb=' + Date.now())
|
| 54 |
+
.then(res => res.json())
|
| 55 |
+
.then(adsData => {
|
| 56 |
+
if (adsData[currentSite] && adsData[currentSite].ad_code) {
|
| 57 |
+
const container = document.getElementById('central-top-zone');
|
| 58 |
+
container.innerHTML = adsData[currentSite].ad_code;
|
| 59 |
+
// تفعيل السكربتات المدمجة بالإعلان
|
| 60 |
+
container.querySelectorAll("script").forEach(oldScript => {
|
| 61 |
+
const s = document.createElement("script");
|
| 62 |
+
Array.from(oldScript.attributes).forEach(a => s.setAttribute(a.name, a.value));
|
| 63 |
+
s.text = oldScript.text;
|
| 64 |
+
oldScript.parentNode.replaceChild(s, oldScript);
|
| 65 |
+
});
|
| 66 |
+
}
|
| 67 |
+
}).catch(e => console.log("Central Ads Load Error"));
|
| 68 |
+
});
|
| 69 |
+
</script>
|
| 70 |
+
<script src="https://eslammsd-eslam-manager-bot.hf.space/static/custom_management.js?cb=" + Date.now()></script>
|
| 71 |
+
|
| 72 |
<nav class="navbar">
|
| 73 |
<div class="logo" onclick="navigateTo('')">Innovation Hub</div>
|
| 74 |
<div class="nav-links"><div onclick="navigateTo('')">🏠 Home Feed</div></div>
|