<!-- كوورة 10 -->
<div id="koora10" class="tab-content active">
<h2> </h2>
<div id="koora10Status" class="status loading">جاري تحميل المباريات...</div>
<div id="koora10Matches"></div>
</div>

<!-- Rereyano -->
<div id="rereyano" class="tab-content">
<h2> </h2>
<div id="rereyanoStatus" class="status loading">جاري تحميل المباريات...</div>
<div id="rereyanoMatches"></div>
</div>

<!-- Sportsonline -->
<div id="sportsonline" class="tab-content">
<h2> </h2>
<div id="sportsonlineStatus" class="status loading">جاري تحميل المباريات...</div>
<div id="sportsonlineMatches"></div>
</div>
</div>

<!-- مشغل الفيديو المشترك -->
<div id="playerOverlay">
<iframe id="playerFrame" allowfullscreen></iframe>
<button id="closeBtn" onclick="closePlayer()">&#10006; إغلاق المشغل</button>
</div>

<footer>
<p>جميع الحقوق محفوظة &#169; 2023 - خدمة البث المباشر للمباريات</p>
</footer>

<script>
// متغيرات عامة
let matchData = [];
let channelNames = {};
// دالة لتبديل علامات التبويب
function openTab(tabId) {
// إخفاء جميع محتويات التبويب
const tabContents = document.getElementsByClassName('tab-content');
for (let i = 0; i < tabContents.length; i++) {
tabContents[i].classList.remove('active');
}
// إلغاء تنشيط جميع أزرار التبويب
const tabButtons = document.getElementsByClassName('tab-btn');
for (let i = 0; i < tabButtons.length; i++) {
tabButtons[i].classList.remove('active');
}
// عرض محتوى التبويب المحدد وتنشيط الزر
document.getElementById(tabId).classList.add('active');
event.currentTarget.classList.add('active');
}
// دالة لفتح المشغل
function openPlayer(url) {
const playerFrame = document.getElementById('playerFrame');
const playerOverlay = document.getElementById('playerOverlay');
playerFrame.src = url;
playerOverlay.style.display = 'flex';
// منع التمرير عند فتح المشغل
document.body.style.overflow = 'hidden';
}
// دالة لإغلاق المشغل
function closePlayer() {
const playerFrame = document.getElementById('playerFrame');
const playerOverlay = document.getElementById('playerOverlay');
playerFrame.src = '';
playerOverlay.style.display = 'none';
// إعادة التمرير
document.body.style.overflow = 'auto';
}
// إغلاق المشغل عند النقر خارج الإطار
document.getElementById('playerOverlay').addEventListener('click', function(e) {
if (e.target === this) {
closePlayer();
}
});

// ===== كوورة 10 =====
async function loadKoora10Content() {
const statusEl = document.getElementById('koora10Status');
const container = document.getElementById('koora10Matches');
const targetUrl = "https://cdn39.koora10.live/alkoora.txt";
try {
const response = await fetch(`https://api.allorigins.win/raw?url=${encodeURIComponent(targetUrl)}`);
let content = await response.text();
// تنظيف المحتوى
content = content.replace(/September 09, 2025/g, '')
.replace(/عرض محتوى من الرابط/g, '')
.replace(/------------ Schedule -----------------------------------------------------/g, '')
.replace(/\*Any INFO\/ISSUES\/PARTNERSHIP email:.*/g, '')
.replace(/\*\*All streams will be online.*/g, '')
.replace(/\*\*\*Please refresh.*/g, '')
.replace(/\*\*\*\*If you want.*/g, '');
// استخراج المباريات
const matchRegex = /(\d{2}:\d{2})\s+([^\n]+)\s+(https?:\/\/cdn39\.koora10\.live\/chtv\/([a-z0-9]+)\.php)/g;
let matches = [];
let match;
while ((match = matchRegex.exec(content)) !== null) {
matches.push({
time: match[1],
matchName: match[2].trim(),
channel: match[4]
});
}
// عرض المباريات
if (matches.length > 0) {
statusEl.className = 'status';
statusEl.textContent = `تم تحميل ${matches.length} مباراة`;
matches.forEach(match => {
const card = document.createElement('div');
card.className = 'content-card';
card.innerHTML = `
<div class="match-time">${match.time}</div>
<div class="match-name">${match.matchName}</div>
<a class="match-channel" onclick="openPlayer('https://cdn39.koora10.live/chtv/${match.channel}.php')">
CH${match.channel.charAt(2)}
</a>
`;
container.appendChild(card);
});
} else {
statusEl.className = 'status error';
statusEl.textContent = 'لم يتم العثور على مباريات';
}

Comments

Popular posts from this blog