- Rankings
- World Cup
- EURO
-
Advertisement
- Copa America
- Champions League
- Europa League
- Europa Conference League
- Premier League
- Bundesliga
- LaLiga
- Ligue 1
- Serie A
- Eredivisie
- Super Lig
- < Back
- ENGLAND
- Premier League
- Championship
- League One
- League Two
- National League
- National League North/South
- Northern Premier League
- Premier Reserve League 1
- Premier Reserve League 2
- Premier League U18
- FA Cup Qualification
- FA Cup
- EFL Cup
- Community Shield
- EFL Trophy
- FA Trophy Qualification
- FA Trophy
- Premier League Cup
- WSL (Women)
- WSL Cup (Women)
- FA Cup (Women)
- Community Shield (Women)
- International
- England
- Germany
- Spain
- France
- Italy
- Netherlands
- Turkiye
- Albania
-
Advertisement
- Algeria
- Andorra
- Angola
- Argentina
- Armenia
- Australia
- Austria
- Azerbaijan
- Bahrain
- Belarus
- Belgium
- Bolivia
- Bosnia And Herzegovina
- Botswana
- Brazil
- Bulgaria
- Burkina Faso
- Burundi
- Cameroon
- Canada
- Chile
- China
- Colombia
- Costa Rica
- Croatia
- Cuba
- Cyprus
- Czechia
- Democratic Republic Of The Congo
- Denmark
- Ecuador
- Egypt
- El Salvador
- Estonia
- Faroe Islands
- Finland
- Gabon
- Georgia
- Ghana
- Gibraltar
- Greece
- Guatemala
- Honduras
- Hong Kong
- Hungary
- Iceland
- India
- Indonesia
- Iran
- Iraq
- Ireland
- Israel
- Ivory Coast
- Jamaica
- Japan
- Jordan
- Kazakhstan
- Kenya
- Kosovo
- Kuwait
- Latvia
- Lebanon
- Liechtenstein
- Lithuania
- Luxembourg
- Malaysia
- Malta
- Mexico
- Moldova
- Montenegro
- Morocco
- Mozambique
- Myanmar
- New Zealand
- Nicaragua
- Nigeria
- North Macedonia
- Northern Ireland
- Norway
- Oman
- Palestine
- Panama
- Paraguay
- Peru
- Philippines
- Poland
- Portugal
- Qatar
- Romania
- Russia
- San Marino
- Saudi Arabia
- Scotland
- Serbia
- Singapore
- Slovakia
- Slovenia
- South Africa
- South Korea
- Sweden
- Switzerland
- Syria
- Taiwan
- Tajikistan
- Tanzania
- Thailand
- Tunisia
- Turkmenistan
- Usa
- Uganda
- Ukraine
- United Arab Emirates
- Uruguay
- Uzbekistan
- Venezuela
- Vietnam
- Wales
- Yemen
- Zambia
- Zimbabwe
- SHOW MORE
Overview Standings Results Fixtures Player Stats
"; noDataFound.innerHTML += "
No Data Found
"; noDataFound.innerHTML += "
No data found for " + options.selectedLeagueName.replace(/\b\w/g, function(char) { return char.toUpperCase(); }) + " for " + options.selectedSeasonName + ".
"; document.getElementsByClassName("competition_data")[0].appendChild(noData); // document.getElementsByClassName("competition_tabs")[0].style.display = "none"; document.getElementsByClassName("results_wrapper")[0].style.display = "none"; document.getElementsByClassName("standings_wrapper")[0].style.display = "none"; } try { let roundSelect = null; let maxRoundLen = selectedLeagueStages[leagueInfo.currentLeaguePos].rounds.length; if (maxRoundLen > 0 && displayRounds) { roundSelect = document.createElement("select"); roundSelect.className = "round_select"; } leagueInfo.currentRound = selectedLeagueStages[leagueInfo.currentLeaguePos].round; for (let a = 0; a < maxRoundLen; a++) { if (displayRounds) { let curOption = document.createElement("option"); curOption.setAttribute("value", selectedLeagueStages[leagueInfo.currentLeaguePos].rounds[a].id); curOption.textContent = selectedLeagueStages[leagueInfo.currentLeaguePos].rounds[a].name; } leagueInfo.rounds.push(selectedLeagueStages[leagueInfo.currentLeaguePos].rounds[a]); if (selectedLeagueStages[leagueInfo.currentLeaguePos].rounds[a].name === selectedLeagueStages[leagueInfo.currentLeaguePos].round.name) { leagueInfo.currentRoundPos = a; if (displayRounds) curOption.setAttribute("selected", ""); } if (displayRounds) roundSelect.appendChild(curOption); } if (displayRounds) document.getElementsByClassName("season_wrapper")[0].appendChild(roundSelect); } catch(e) { console.log("No rounds"); } return leagueInfo; } async function init_fixtures() { let leaguerounds = await getCurrentRound(); if (leaguerounds.currentRoundPos > -1) { document.getElementsByClassName("results_wrapper")[0].style.display = "block"; document.getElementsByClassName("standings_wrapper")[0].style.display = "none"; new MatchList({ countryName: options.selectedCountryName, leagueName: options.selectedLeagueName, leagueCode: options.selectedStageId, season: options.selectedSeasonName, displayType: 'fixtures', parentLeague: true, selectedRound: 0, clearContent: true, appendTo: document.querySelectorAll(".results_parent")[0] }); } } async function init_results() { let leaguerounds = await getCurrentRound(); if (leaguerounds.currentRoundPos > -1) { document.getElementsByClassName("results_wrapper")[0].style.display = "block"; document.getElementsByClassName("standings_wrapper")[0].style.display = "none"; new MatchList({ countryName: options.selectedCountryName, leagueName: options.selectedLeagueName, leagueCode: options.selectedStageId, season: options.selectedSeasonName, parentLeague: true, displayType: 'results', selectedRound: 0, clearContent: true, appendTo: document.querySelectorAll(".results_parent")[0] }); } } async function init_player_statistics() { await getCurrentRound(); let results_wrapper = document.querySelector(".results_wrapper"); results_wrapper.innerHTML = ""; //setup sub tabs let player_stats_submenu = document.createElement('div'); player_stats_submenu.classList.add( "league_table_header"); // player_stats_submenu.style.paddingTop= "10px"; if (leagueFeatures.hasTopScorers) { player_stats_submenu.innerHTML = '
Top Scorers
'; } else { player_stats_submenu.innerHTML = ''; } if (leagueFeatures.hasAssistList) { player_stats_submenu.innerHTML += '
Assists
'; } if (leagueFeatures.hasCardList) { player_stats_submenu.innerHTML += '
Cards
'; } if (leagueFeatures.hasParticipantStats) { player_stats_submenu.innerHTML += '
Minutes Played
'; } results_wrapper.append(player_stats_submenu); let standings_wrapper = document.createElement('div'); results_wrapper.append(standings_wrapper); let firstTab = null; if (document.getElementById("topScorersBtn")) { firstTab = 'topscorers'; document.getElementById("topScorersBtn").addEventListener("click", async function() { let allSubTabs = document.getElementsByClassName("stats_btn"); for (let i=0; i < allSubTabs.length; i++){ allSubTabs[i].classList.remove("stats_selected"); } this.classList.add("stats_selected"); await displayTopScorers(standings_wrapper) }); } if (document.getElementById("cardListBtn")) { if (!firstTab) firstTab = 'cardlist'; document.getElementById("cardListBtn").addEventListener("click", async function(){ let allSubTabs = document.getElementsByClassName("stats_btn"); for (let i=0; i < allSubTabs.length; i++){ allSubTabs[i].classList.remove("stats_selected"); } this.classList.add("stats_selected"); await displayCardList(standings_wrapper); }); } if (document.getElementById("assistListBtn")) { if (!firstTab) firstTab = 'assists'; document.getElementById("assistListBtn").addEventListener("click", async function () { let allSubTabs = document.getElementsByClassName("stats_btn"); for (let i = 0; i < allSubTabs.length; i++) { allSubTabs[i].classList.remove("stats_selected"); } this.classList.add("stats_selected"); await displayAssistList(standings_wrapper); }); } if (document.getElementById("minutesPlayedBtn")) { if (!firstTab) firstTab = 'minutesplayed'; document.getElementById("minutesPlayedBtn").addEventListener("click", async function () { let allSubTabs = document.getElementsByClassName("stats_btn"); for (let i = 0; i < allSubTabs.length; i++) { allSubTabs[i].classList.remove("stats_selected"); } this.classList.add("stats_selected"); await displayMinutesPlayedList(standings_wrapper); }); } switch (firstTab) { case 'topscorers': document.getElementById("topScorersBtn").click(); break; case 'cardlist': document.getElementById("cardListBtn").click(); break; case 'assists': document.getElementById("assistListBtn").click(); break; case 'minutesplayed': document.getElementById("minutesPlayedBtn").click(); break; } } async function displayTopScorers(appendTo) { await loadComponentCSS("/scripts/components/soccer/newStandings/standings.min.css"); new LeagueStandings({ countryName: options.selectedCountryName, leagueName: options.selectedLeagueName, leagueCode: options.selectedStageId, season: options.selectedSeasonName, standingType: 'scorers', homeTeam: '', awayTeam: '', appendTo: appendTo }); } async function displayCardList(appendTo) { await loadComponentCSS("/scripts/components/soccer/newStandings/standings.min.css"); new LeagueStandings({ countryName: options.selectedCountryName, leagueName: options.selectedLeagueName, leagueCode: options.selectedStageId, season: options.selectedSeasonName, standingType: 'cardlist', homeTeam: '', awayTeam: '', appendTo: appendTo }); } async function displayAssistList(appendTo) { await loadComponentCSS("/scripts/components/soccer/newStandings/standings.min.css"); new LeagueStandings({ countryName: options.selectedCountryName, leagueName: options.selectedLeagueName, leagueCode: options.selectedStageId, season: options.selectedSeasonName, standingType: 'assists', homeTeam: '', awayTeam: '', appendTo: appendTo }); } async function displayMinutesPlayedList(appendTo) { await loadComponentCSS("/scripts/components/soccer/newStandings/standings.min.css"); new LeagueStandings({ countryName: options.selectedCountryName, leagueName: options.selectedLeagueName, leagueCode: options.selectedStageId, season: options.selectedSeasonName, standingType: 'minutesplayed', homeTeam: '', awayTeam: '', appendTo: appendTo }); } async function init_standings() { await getCurrentRound(); let standings_type = 'ligatable'; if (leagueFeatures.hasLiveStandings && leagueFeatures.leagueHasLiveMatches) standings_type = "live_league_table"; if (options.hasStandings) { await new LeagueStandings({ countryName: options.selectedCountryName, leagueName: options.selectedLeagueName, leagueCode: options.selectedStageId, season: options.selectedSeasonName, standingType: standings_type, tableType: "total", availableStandings: { regular: true, live: leagueFeatures.hasLiveStandings, topScorers: leagueFeatures.hasTopScorers, cardList: leagueFeatures.hasCardList, assistList: leagueFeatures.hasAssistList, filtered: leagueFeatures.hasFilteredStandings }, appendTo: document.querySelectorAll(".standings_table")[0] }); } else { document.getElementsByClassName("standings_wrapper")[0].style.display = "none"; } } async function init_overview() { let leaguerounds = await getCurrentRound(); let matchlistDiv = document.createElement("div"); matchlistDiv.classList.add("matchlistDiv"); let standingsDiv = document.createElement("div"); standingsDiv.classList.add("standingsDiv"); let parentDiv = document.querySelectorAll(".results_parent")[0]; parentDiv.appendChild(matchlistDiv); parentDiv.appendChild(standingsDiv); if (leaguerounds.currentRoundPos > -1) { let fetchRound = leaguerounds.rounds[leaguerounds.currentRoundPos]; document.getElementsByClassName("results_wrapper")[0].style.display = "block"; await new MatchListRounds({ countryName: options.selectedCountryName, leagueName: options.selectedLeagueName, leagueCode: options.selectedStageId, season: options.selectedSeasonName, displayType: 'results', selectedRound: fetchRound.name, clearContent: true, appendTo: document.querySelectorAll(".results_parent")[0], rounds: leaguerounds.rounds }); } if (options.hasStandings) { let standings_type = 'ligatable'; if (leagueFeatures.hasLiveStandings && leagueFeatures.leagueHasLiveMatches) standings_type = "live_league_table"; await new LeagueStandings({ countryName: options.selectedCountryName, leagueName: options.selectedLeagueName, leagueCode: options.selectedStageId, season: options.selectedSeasonName, standingType: standings_type, tableType: "total", availableStandings: { regular: true, live: leagueFeatures.hasLiveStandings, topScorers: leagueFeatures.hasTopScorers, cardList: leagueFeatures.hasCardList, assistList: leagueFeatures.hasAssistList, filtered: leagueFeatures.hasFilteredStandings }, appendTo: document.querySelectorAll(".standings_table")[0] }); } else { document.getElementsByClassName("standings_wrapper")[0].style.display = "none"; } } async function loadComponentCSS(cssFile) { let allLinks = document.querySelectorAll('link'); let cssExists = false; allLinks.forEach(function (c) { if (c.getAttribute('href') === cssFile) { cssExists = true; } }); if (!cssExists) { let link = document.createElement('link'); link.rel = 'stylesheet'; link.type = 'text/css'; link.href = cssFile; document.head.appendChild(link); } } async function loadComponentJS(jsFile, cb) { let allLinks = document.querySelectorAll('script'); let jsExists = false; allLinks.forEach(function (c) { if (c.getAttribute('src') === jsFile) { jsExists = true } }); if (!jsExists) { let script = document.createElement('script'); script.onload = cb; script.src = jsFile; document.head.appendChild(script); } else { cb(); } } let seasons = getSeasons(); let winLoc = window.location.href.split("/"); let winLocLen = hasSeason() ? winLoc.length - 2 : winLoc.length - 1; let pageIndex = winLoc[winLocLen].split('?')[0]; switch (pageIndex) { case "standings": init_standings(); break; case "results": init_results(); break; case "fixtures": init_fixtures(); break; case "player-statistics": init_player_statistics(); break; default: init_overview(); break; }
Advertisement
Advertisement