FIFA WC 26™ 🇬🇧 English 🇻🇳 Tiếng Việt Standings Matches By Date By Round By Group (function() { let currentLang = 'vi'; let allMatches = []; let currentPage = 1; const matchesPerPage = 10; let currentFilter = 'date'; // State for active chips let activeRound = "Round 1"; let activeGroup = "A"; const teamsImg = { "Mexico": "https://img.sofascore.com/api/v1/team/4781/image", "South Africa": "https://img.sofascore.com/api/v1/team/4736/image", "South Korea": "https://img.sofascore.com/api/v1/team/4735/image", "UEFA Play-off D": "https://img.sofascore.com/api/v1/team/1157160/image", "Canada": "https://img.sofascore.com/api/v1/team/4752/image", "UEFA Play-off A": "https://img.sofascore.com/api/v1/team/1157161/image", "Qatar": "https://img.sofascore.com/api/v1/team/4792/image", "Switzerland": "https://img.sofascore.com/api/v1/team/4699/image", "Brazil": "https://img.sofascore.com/api/v1/team/4748/image", "Morocco": "https://img.sofascore.com/api/v1/team/4778/image", "Haiti": "https://img.sofascore.com/api/v1/team/7229/image", "Scotland": "https://img.sofascore.com/api/v1/team/4695/image", "USA": "https://img.sofascore.com/api/v1/team/4724/image", "Paraguay": "https://img.sofascore.com/api/v1/team/4789/image", "Australia": "https://img.sofascore.com/api/v1/team/4741/image", "UEFA Play-off C": "https://img.sofascore.com/api/v1/team/1157162/image", "Germany": "https://img.sofascore.com/api/v1/team/4711/image", "Curaçao": "https://img.sofascore.com/api/v1/team/55827/image", "Côte d’Ivoire": "https://img.sofascore.com/api/v1/team/4768/image", "Ecuador": "https://img.sofascore.com/api/v1/team/4757/image", "Netherlands": "https://img.sofascore.com/api/v1/team/4705/image", "Japan": "https://img.sofascore.com/api/v1/team/4770/image", "UEFA Play-off B": "https://img.sofascore.com/api/v1/team/1157163/image", "Tunisia": "https://img.sofascore.com/api/v1/team/4729/image", "Belgium": "https://img.sofascore.com/api/v1/team/4717/image", "Egypt": "https://img.sofascore.com/api/v1/team/4758/image", "Iran": "https://img.sofascore.com/api/v1/team/4766/image", "New Zealand": "https://img.sofascore.com/api/v1/team/4784/image", "Spain": "https://img.sofascore.com/api/v1/team/4698/image", "Cabo Verde": "https://img.sofascore.com/api/v1/team/4753/image", "Saudi Arabia": "https://img.sofascore.com/api/v1/team/4834/image", "Uruguay": "https://img.sofascore.com/api/v1/team/4725/image", "France": "https://img.sofascore.com/api/v1/team/4481/image", "Senegal": "https://img.sofascore.com/api/v1/team/4739/image", "FIFA Play-Off 2": "https://img.sofascore.com/api/v1/team/1157164/image", "Norway": "https://img.sofascore.com/api/v1/team/4475/image", "Argentina": "https://img.sofascore.com/api/v1/team/4819/image", "Algeria": "https://img.sofascore.com/api/v1/team/4691/image", "Austria": "https://img.sofascore.com/api/v1/team/4718/image", "Jordan": "https://img.sofascore.com/api/v1/team/4771/image", "Portugal": "https://img.sofascore.com/api/v1/team/4704/image", "FIFA Play-Off 1": "https://img.sofascore.com/api/v1/team/1157165/image", "Uzbekistan": "https://img.sofascore.com/api/v1/team/4723/image", "Colombia": "https://img.sofascore.com/api/v1/team/4820/image", "England": "https://img.sofascore.com/api/v1/team/4713/image", "Croatia": "https://img.sofascore.com/api/v1/team/4715/image", "Ghana": "https://img.sofascore.com/api/v1/team/4764/image", "Panama": "https://img.sofascore.com/api/v1/team/5164/image" }; const teamNamesVI = { "Mexico": "Mexico", "South Africa": "Nam Phi", "South Korea": "Hàn Quốc", "UEFA Play-off D": "Play-off Châu Âu D", "Canada": "Canada", "UEFA Play-off A": "Play-off Châu Âu A", "Qatar": "Qatar", "Switzerland": "Thụy Sĩ", "Brazil": "Brazil", "Morocco": "Ma Rốc", "Haiti": "Haiti", "Scotland": "Scotland", "USA": "Mỹ", "Paraguay": "Paraguay", "Australia": "Úc", "UEFA Play-off C": "Play-off Châu Âu C", "Germany": "Đức", "Curaçao": "Curaçao", "Côte d’Ivoire": "Bờ Biển Ngà", "Ecuador": "Ecuador", "Netherlands": "Hà Lan", "Japan": "Nhật Bản", "UEFA Play-off B": "Play-off Châu Âu B", "Tunisia": "Tunisia", "Belgium": "Bỉ", "Egypt": "Ai Cập", "Iran": "Iran", "New Zealand": "New Zealand", "Spain": "Tây Ban Nha", "Cabo Verde": "Cabo Verde", "Saudi Arabia": "Ả Rập Xê Út", "Uruguay": "Uruguay", "France": "Pháp", "Senegal": "Senegal", "FIFA Play-Off 2": "Play-Off FIFA 2", "Norway": "Na Uy", "Argentina": "Argentina", "Algeria": "Algeria", "Austria": "Áo", "Jordan": "Jordan", "Portugal": "Bồ Đào Nha", "FIFA Play-Off 1": "Play-Off FIFA 1", "Uzbekistan": "Uzbekistan", "Colombia": "Colombia", "England": "Anh", "Croatia": "Croatia", "Ghana": "Ghana", "Panama": "Panama" }; const i18n = { en: { standings: "Standings", matches: "Matches", byDate: "By Date", byRound: "By Round", byGroup: "By Group", grp: "Group", team: "Team", pts: "Pts", prev: "Prev", next: "Next", page: "Page", all_matches: "All Matches - Chronological", r1: "Round 1", r2: "Round 2", r3: "Round 3" }, vi: { standings: "Bảng xếp hạng", matches: "Lịch thi đấu", byDate: "Theo Ngày", byRound: "Theo Vòng", byGroup: "Theo Bảng", grp: "Bảng", team: "Đội", pts: "Đ", prev: "Trước", next: "Sau", page: "Trang", all_matches: "Tất cả trận đấu - Theo thời gian", r1: "Vòng 1", r2: "Vòng 2", r3: "Vòng 3" } }; const groupsConfig = [ { id: "A", teams: ["Mexico", "South Africa", "South Korea", "UEFA Play-off D"] }, { id: "B", teams: ["Canada", "UEFA Play-off A", "Qatar", "Switzerland"] }, { id: "C", teams: ["Brazil", "Morocco", "Haiti", "Scotland"] }, { id: "D", teams: ["USA", "Paraguay", "Australia", "UEFA Play-off C"] }, { id: "E", teams: ["Germany", "Curaçao", "Côte d’Ivoire", "Ecuador"] }, { id: "F", teams: ["Netherlands", "Japan", "UEFA Play-off B", "Tunisia"] }, { id: "G", teams: ["Belgium", "Egypt", "Iran", "New Zealand"] }, { id: "H", teams: ["Spain", "Cabo Verde", "Saudi Arabia", "Uruguay"] }, { id: "I", teams: ["France", "Senegal", "FIFA Play-Off 2", "Norway"] }, { id: "J", teams: ["Argentina", "Algeria", "Austria", "Jordan"] }, { id: "K", teams: ["Portugal", "FIFA Play-Off 1", "Uzbekistan", "Colombia"] }, { id: "L", teams: ["England", "Croatia", "Ghana", "Panama"] } ]; const scheduleRaw = { "A": { "Round 1": [{ d: "12/06", t: "02:00", t1: "Mexico", t2: "South Africa" }, { d: "12/06", t: "09:00", t1: "South Korea", t2: "UEFA Play-off D" }], "Round 2": [{ d: "18/06", t: "23:00", t1: "UEFA Play-off D", t2: "South Africa" }, { d: "19/06", t: "08:00", t1: "Mexico", t2: "South Korea" }], "Round 3": [{ d: "25/06", t: "08:00", t1: "UEFA Play-off D", t2: "Mexico" }, { d: "25/06", t: "08:00", t1: "South Africa", t2: "South Korea" }] }, "B": { "Round 1": [{ d: "13/06", t: "02:00", t1: "Canada", t2: "UEFA Play-off A" }, { d: "14/06", t: "02:00", t1: "Qatar", t2: "Switzerland" }], "Round 2": [{ d: "19/06", t: "02:00", t1: "Switzerland", t2: "UEFA Play-off A" }, { d: "19/06", t: "05:00", t1: "Canada", t2: "Qatar" }], "Round 3": [{ d: "25/06", t: "02:00", t1: "Switzerland", t2: "Canada" }, { d: "25/06", t: "02:00", t1: "UEFA Play-off A", t2: "Qatar" }] }, "C": { "Round 1": [{ d: "14/06", t: "05:00", t1: "Brazil", t2: "Morocco" }, { d: "14/06", t: "08:00", t1: "Haiti", t2: "Scotland" }], "Round 2": [{ d: "20/06", t: "05:00", t1: "Scotland", t2: "Morocco" }, { d: "20/06", t: "08:00", t1: "Brazil", t2: "Haiti" }], "Round 3": [{ d: "25/06", t: "05:00", t1: "Scotland", t2: "Brazil" }, { d: "25/06", t: "05:00", t1: "Morocco", t2: "Haiti" }] }, "D": { "Round 1": [{ d: "13/06", t: "08:00", t1: "USA", t2: "Paraguay" }, { d: "13/06", t: "11:00", t1: "Australia", t2: "UEFA Play-off C" }], "Round 2": [{ d: "19/06", t: "11:00", t1: "UEFA Play-off C", t2: "Paraguay" }, { d: "20/06", t: "02:00", t1: "USA", t2: "Australia" }], "Round 3": [{ d: "26/06", t: "09:00", t1: "Paraguay", t2: "Australia" }, { d: "26/06", t: "09:00", t1: "UEFA Play-off C", t2: "USA" }] }, "E": { "Round 1": [{ d: "15/06", t: "00:00", t1: "Germany", t2: "Curaçao" }, { d: "15/06", t: "06:00", t1: "Côte d’Ivoire", t2: "Ecuador" }], "Round 2": [{ d: "21/06", t: "03:00", t1: "Germany", t2: "Côte d’Ivoire" }, { d: "21/06", t: "07:00", t1: "Ecuador", t2: "Curaçao" }], "Round 3": [{ d: "26/06", t: "03:00", t1: "Ecuador", t2: "Germany" }, { d: "26/06", t: "03:00", t1: "Curaçao", t2: "Côte d’Ivoire" }] }, "F": { "Round 1": [{ d: "15/06", t: "03:00", t1: "Netherlands", t2: "Japan" }, { d: "15/06", t: "09:00", t1: "UEFA Play-off B", t2: "Tunisia" }], "Round 2": [{ d: "20/06", t: "11:00", t1: "Tunisia", t2: "Japan" }, { d: "21/06", t: "00:00", t1: "Netherlands", t2: "UEFA Play-off B" }], "Round 3": [{ d: "26/06", t: "06:00", t1: "Tunisia", t2: "Netherlands" }, { d: "26/06", t: "06:00", t1: "Japan", t2: "UEFA Play-off B" }] }, "G": { "Round 1": [{ d: "16/06", t: "02:00", t1: "Belgium", t2: "Egypt" }, { d: "16/06", t: "08:00", t1: "Iran", t2: "New Zealand" }], "Round 2": [{ d: "22/06", t: "02:00", t1: "Belgium", t2: "Iran" }, { d: "22/06", t: "08:00", t1: "New Zealand", t2: "Egypt" }], "Round 3": [{ d: "27/06", t: "10:00", t1: "Egypt", t2: "Iran" }, { d: "27/06", t: "10:00", t1: "New Zealand", t2: "Belgium" }] }, "H": { "Round 1": [{ d: "15/06", t: "23:00", t1: "Spain", t2: "Cabo Verde" }, { d: "16/06", t: "05:00", t1: "Saudi Arabia", t2: "Uruguay" }], "Round 2": [{ d: "21/06", t: "23:00", t1: "Spain", t2: "Saudi Arabia" }, { d: "22/06", t: "05:00", t1: "Uruguay", t2: "Cabo Verde" }], "Round 3": [{ d: "27/06", t: "07:00", t1: "Uruguay", t2: "Spain" }, { d: "27/06", t: "07:00", t1: "Cabo Verde", t2: "Saudi Arabia" }] }, "I": { "Round 1": [{ d: "17/06", t: "02:00", t1: "France", t2: "Senegal" }, { d: "17/06", t: "05:00", t1: "FIFA Play-Off 2", t2: "Norway" }], "Round 2": [{ d: "23/06", t: "04:00", t1: "France", t2: "FIFA Play-Off 2" }, { d: "23/06", t: "07:00", t1: "Norway", t2: "Senegal" }], "Round 3": [{ d: "27/06", t: "02:00", t1: "Norway", t2: "France" }, { d: "27/06", t: "02:00", t1: "Senegal", t2: "FIFA Play-Off 2" }] }, "J": { "Round 1": [{ d: "16/06", t: "11:00", t1: "Austria", t2: "Jordan" }, { d: "17/06", t: "08:00", t1: "Argentina", t2: "Algeria" }], "Round 2": [{ d: "23/06", t: "00:00", t1: "Argentina", t2: "Austria" }, { d: "23/06", t: "10:00", t1: "Jordan", t2: "Algeria" }], "Round 3": [{ d: "28/06", t: "09:00", t1: "Jordan", t2: "Argentina" }, { d: "28/06", t: "09:00", t1: "Algeria", t2: "Austria" }] }, "K": { "Round 1": [{ d: "18/06", t: "00:00", t1: "Portugal", t2: "FIFA Play-Off 1" }, { d: "18/06", t: "09:00", t1: "Uzbekistan", t2: "Colombia" }], "Round 2": [{ d: "24/06", t: "00:00", t1: "Portugal", t2: "Uzbekistan" }, { d: "24/06", t: "09:00", t1: "Colombia", t2: "FIFA Play-Off 1" }], "Round 3": [{ d: "28/06", t: "06:30", t1: "Colombia", t2: "Portugal" }, { d: "28/06", t: "06:30", t1: "FIFA Play-Off 1", t2: "Uzbekistan" }] }, "L": { "Round 1": [{ d: "18/06", t: "03:00", t1: "England", t2: "Croatia" }, { d: "18/06", t: "06:00", t1: "Ghana", t2: "Panama" }], "Round 2": [{ d: "24/06", t: "03:00", t1: "England", t2: "Ghana" }, { d: "24/06", t: "06:00", t1: "Panama", t2: "Croatia" }], "Round 3": [{ d: "28/06", t: "04:00", t1: "Panama", t2: "England" }, { d: "28/06", t: "04:00", t1: "Croatia", t2: "Ghana" }] } }; // === GLOBAL FUNCTIONS === window.wc26_changeLang = function(lang) { currentLang = lang; applyTranslations(); }; window.wc26_switchTab = function(tabName) { document.querySelectorAll('#wc26-app .wc26-section').forEach(el => el.classList.remove('active')); document.querySelectorAll('#wc26-app .nav-btn').forEach(el => el.classList.remove('active')); document.getElementById('wc26-' + tabName).classList.add('active'); if(tabName === 'standings') document.getElementById('lbl-standings').classList.add('active'); else document.getElementById('lbl-matches').classList.add('active'); }; window.wc26_setFilter = function(type, el) { currentFilter = type; document.querySelectorAll('#wc26-app .filter-pill').forEach(b => b.classList.remove('active')); if(el) el.classList.add('active'); // Toggle container visibility document.getElementById('wc26-chips-round').classList.toggle('show', type === 'round'); document.getElementById('wc26-chips-group').classList.toggle('show', type === 'group'); document.getElementById('wc26-pagination').style.display = (type === 'date') ? 'flex' : 'none'; if (type === 'date') { currentPage = 1; wc26_renderMatchesByDate(); } else if (type === 'round') { wc26_renderMatchesByRound(); } else if (type === 'group') { wc26_renderMatchesByGroup(); } }; // === CHANGE CHIPS === window.wc26_changeRound = function(roundName) { activeRound = roundName; wc26_updateChipUI('wc26-chips-round', roundName); wc26_renderMatchesByRound(); }; window.wc26_changeGroup = function(groupName) { activeGroup = groupName; wc26_updateChipUI('wc26-chips-group', groupName); wc26_renderMatchesByGroup(); }; function wc26_updateChipUI(containerId, activeVal) { const container = document.getElementById(containerId); const buttons = container.getElementsByClassName('chip-btn'); for(let btn of buttons) { if(btn.dataset.val === activeVal) btn.classList.add('active'); else btn.classList.remove('active'); } } // === RENDER CHIPS UI === function renderFilterChips() { // Render Rounds const rContainer = document.getElementById('wc26-chips-round'); rContainer.innerHTML = ''; ["Round 1", "Round 2", "Round 3"].forEach(r => { let display = (r==="Round 1") ? t('r1') : (r==="Round 2") ? t('r2') : t('r3'); let isActive = (r === activeRound) ? 'active' : ''; rContainer.innerHTML += `${display}`; }); // Render Groups const gContainer = document.getElementById('wc26-chips-group'); gContainer.innerHTML = ''; for(let i=65; i m.round === activeRound); let roundDisplay = (activeRound === "Round 1") ? t('r1') : (activeRound === "Round 2") ? t('r2') : t('r3'); let html = `${roundDisplay}`; matches.forEach(m => html += createMatchCard(m)); container.innerHTML = html; }; window.wc26_renderMatchesByGroup = function() { const container = document.getElementById('wc26-matches-render'); const data = scheduleRaw[activeGroup]; let html = ''; for (const [round, matches] of Object.entries(data)) { let roundDisplay = (round === "Round 1") ? t('r1') : (round === "Round 2") ? t('r2') : t('r3'); html += `${roundDisplay}`; matches.forEach(m => html += createMatchCard({...m, group: activeGroup})); } container.innerHTML = html; }; window.wc26_changePage = function(newPage) { const totalPages = Math.ceil(allMatches.length / matchesPerPage); if (newPage < 1 || newPage > totalPages) return; currentPage = newPage; wc26_renderMatchesByDate(); const tableTop = document.getElementById('wc26-matches-render'); if(tableTop) tableTop.scrollIntoView({behavior: 'smooth'}); }; // === HELPERS === function t(k) { return i18n[currentLang][k] || k; } function getTeamName(rawName) { return (currentLang === 'vi' && teamNamesVI[rawName]) ? teamNamesVI[rawName] : rawName; } function getTeamImg(teamName) { const url = teamsImg[teamName]; if (url) return ``; return `${teamName.substring(0,3)}`; } function createMatchCard(m) { return ` ${m.d}${m.t} ${getTeamImg(m.t1)} ${getTeamName(m.t1)} ${getTeamImg(m.t2)} ${getTeamName(m.t2)} ${t('grp')} ${m.group} ☆ `; } // === RENDER === function renderGroups() { const container = document.getElementById('wc26-groups-render'); let html = ''; groupsConfig.forEach(group => { let rows = ''; group.teams.forEach((team, index) => { const posClass = (index === 0 || index === 1) ? `pos-${index+1}` : ''; rows += `${index + 1}${getTeamImg(team)} ${getTeamName(team)}000000:00`; }); html += ` ${t('grp')} ${group.id} # ${t('team')} P W D L +/- GF ${t('pts')} ${rows} `; }); container.innerHTML = html; } window.wc26_renderMatchesByDate = function() { const container = document.getElementById('wc26-matches-render'); const startIndex = (currentPage - 1) * matchesPerPage; const endIndex = startIndex + matchesPerPage; const matchesToShow = allMatches.slice(startIndex, endIndex); let html = `${t('all_matches')}`; let lastDate = ''; matchesToShow.forEach(m => { if (m.d !== lastDate) { html += `📅 ${m.d}/2026`; lastDate = m.d; } html += createMatchCard(m); }); container.innerHTML = html; renderPagination(); }; function renderPagination() { const container = document.getElementById('wc26-pagination'); const totalPages = Math.ceil(allMatches.length / matchesPerPage); let html = `${t('prev')}`; html += `${t('page')} ${currentPage} / ${totalPages}`; html += `${t('next')}`; container.innerHTML = html; } function applyTranslations() { document.getElementById('lbl-standings').innerText = t('standings'); document.getElementById('lbl-matches').innerText = t('matches'); document.getElementById('lbl-bydate').innerText = t('byDate'); document.getElementById('lbl-byround').innerText = t('byRound'); document.getElementById('lbl-bygroup').innerText = t('byGroup'); // Re-render filters with correct language renderFilterChips(); renderGroups(); if (currentFilter === 'date') wc26_renderMatchesByDate(); else if (currentFilter === 'round') wc26_renderMatchesByRound(); else if (currentFilter === 'group') wc26_renderMatchesByGroup(); } // === INIT === allMatches = []; for (const [groupId, rounds] of Object.entries(scheduleRaw)) { for (const [roundName, matches] of Object.entries(rounds)) { matches.forEach(m => { const [day, month] = m.d.split('/').map(Number); const [hour, min] = m.t.split(':').map(Number); const dateObj = new Date(2026, month - 1, day, hour, min); allMatches.push({ ...m, group: groupId, round: roundName, timestamp: dateObj.getTime() }); }); } } allMatches.sort((a, b) => a.timestamp - b.timestamp); applyTranslations(); })();