<script>
        // Replace with the actual URL of your JSON data
        const apiUrl = 'https://cdn.la2zo.eu.org/jadual.json';

        async function fetchSchedule() {
            try {
                const response = await fetch(apiUrl);
                if (!response.ok) {
                    throw new Error('Failed to fetch schedule');
                }
                const schedule = await response.json();
                const scheduleTable = document.getElementById('schedule');
                
                schedule.forEach(match => {
                    const row = document.createElement('tr');
                    row.innerHTML = `
                        <td>${match.time}</td>
                        <td>${match.event}</td>
                        <td>${match.teams}</td>
                        <td><a href='https://gn.nobar.eu.org/CLICK' onclick='javascript:window.open(&quot;${match.link}&quot;)' target='_self'>${match.ch}</a></td>
                    `;
                    scheduleTable.appendChild(row);
                });
            } catch (error) {
                console.error('Error fetching schedule:', error);
            }
        }

        // Fetch the schedule on page load
        fetchSchedule();
    </script>