
A derrota para o Cerro Porteño certamente não estava no script e evitou uma classificação antecipada do Palmeiras às oitavas de final da Libertadores. Ficou tudo para a última rodada.
Quer saber do que o Verdão precisa? Um empate diante do Junior Barranquilla já garante a vaga, mas o clube paulista pode ainda brigar pela primeira posição do Grupo F. Projete o futuro do time treinado por Abel Ferreira no Simulador 365Scores.
Como funciona o simulador do Grupo F da Libertadores?
A mecânica é simples: assuma o controle, digite os seus palpites para os placares da última rodada e veja a tabela de classificação se atualizar automaticamente.
➡️ Simulador do Fluminense: Tricolor avança? Teste aqui!
➡️ Libertadores 2026: Veja a premiação completa e quanto recebe o campeão
Simule os resultados do Palmeiras, Cerro Porteño, Junior e Sporting Cristal
CLASSIFICAÇÃO
Oitavas da Libertadores
Playoffs da Sul-Americana
`;
}
const home = teamsConfigF[match.home];
const away = teamsConfigF[match.away];
const homeScore = matchResultsF[index] && matchResultsF[index].homeGoals !== undefined ? matchResultsF[index].homeGoals : ”;
const awayScore = matchResultsF[index] && matchResultsF[index].awayGoals !== undefined ? matchResultsF[index].awayGoals : ”;
const disabledAttr = (matchResultsF[index] && matchResultsF[index].locked) ? ‘disabled=”disabled”‘ : ”;
// Inputs convertidos para type=”text” e filtro regex
html += `
`;
});
container.innerHTML = html;
const inputs = document.querySelectorAll(‘#lib-group-f-wrapper .lib-input-score:not([disabled])’);
inputs.forEach(input => {
input.addEventListener(‘input’, handleScoreChangeF);
});
}
function handleScoreChangeF(e) {
const matchIndex = e.target.getAttribute(‘data-match’);
if (matchResultsF[matchIndex] && matchResultsF[matchIndex].locked) return;
const row = e.target.closest(‘.lib-match-row’);
const homeInput = row.querySelector(‘.home-score’).value;
const awayInput = row.querySelector(‘.away-score’).value;
if (homeInput !== “” && awayInput !== “”) {
matchResultsF[matchIndex] = {
homeGoals: parseInt(homeInput, 10),
awayGoals: parseInt(awayInput, 10)
};
} else {
delete matchResultsF[matchIndex];
}
calculateStandingsF();
}
function calculateStandingsF() {
let tableData = {};
// Usando Object.keys para evitar prototype pollution
Object.keys(teamsConfigF).forEach(key => {
tableData[key] = { id: key, pts: 0, j: 0, v: 0, e: 0, d: 0, gp: 0, gc: 0 };
});
Object.keys(matchResultsF).forEach(key => {
let match = matchesScheduleF[key];
let res = matchResultsF[key];
if (!match) return;
let hTeam = tableData[match.home];
let aTeam = tableData[match.away];
if(!hTeam || !aTeam) return;
hTeam.j++; aTeam.j++;
hTeam.gp += res.homeGoals; hTeam.gc += res.awayGoals;
aTeam.gp += res.awayGoals; aTeam.gc += res.homeGoals;
if (res.homeGoals > res.awayGoals) {
hTeam.pts += 3; hTeam.v++; aTeam.d++;
} else if (res.homeGoals < res.awayGoals) {
aTeam.pts += 3; aTeam.v++; hTeam.d++;
} else {
hTeam.pts += 1; aTeam.pts += 1;
hTeam.e++; aTeam.e++;
}
});
let teamsArr = Object.values(tableData);
// Lógica: Confronto Direto
let groupsByPts = {};
teamsArr.forEach(t => {
if (!groupsByPts[t.pts]) groupsByPts[t.pts] = [];
groupsByPts[t.pts].push(t);
});
Object.keys(groupsByPts).forEach(pts => {
let tiedTeams = groupsByPts[pts];
if (tiedTeams.length > 1) {
let tiedIds = tiedTeams.map(t => t.id);
tiedTeams.forEach(t => { t.h2hPts = 0; t.h2hGD = 0; t.h2hGF = 0; });
Object.keys(matchResultsF).forEach(key => {
let match = matchesScheduleF[key];
let res = matchResultsF[key];
if (!match) return;
if (tiedIds.includes(match.home) && tiedIds.includes(match.away)) {
let hTeam = tiedTeams.find(t => t.id === match.home);
let aTeam = tiedTeams.find(t => t.id === match.away);
hTeam.h2hGF += res.homeGoals;
aTeam.h2hGF += res.awayGoals;
hTeam.h2hGD += (res.homeGoals – res.awayGoals);
aTeam.h2hGD += (res.awayGoals – res.homeGoals);
if (res.homeGoals > res.awayGoals) {
hTeam.h2hPts += 3;
} else if (res.homeGoals < res.awayGoals) {
aTeam.h2hPts += 3;
} else {
hTeam.h2hPts += 1; aTeam.h2hPts += 1;
}
}
});
}
});
teamsArr.sort((a, b) => {
if (b.pts !== a.pts) return b.pts – a.pts;
if (a.h2hPts !== undefined && b.h2hPts !== undefined) {
if (b.h2hPts !== a.h2hPts) return b.h2hPts – a.h2hPts;
if (b.h2hGD !== a.h2hGD) return b.h2hGD – a.h2hGD;
if (b.h2hGF !== a.h2hGF) return b.h2hGF – a.h2hGF;
}
let sgA = a.gp – a.gc;
let sgB = b.gp – b.gc;
if (sgB !== sgA) return sgB – sgA;
if (b.gp !== a.gp) return b.gp – a.gf;
return teamsConfigF[a.id].name.localeCompare(teamsConfigF[b.id].name);
});
renderTableF(teamsArr);
}
function renderTableF(sortedTeams) {
const tbody = document.getElementById(‘lib-table-body-f’);
if(!tbody) return;
let html=””;
sortedTeams.forEach((team, index) => {
const posClass = `lib-pos-${index + 1}`;
const sg = team.gp – team.gc;
const sgDisplay = sg > 0 ? `+${sg}` : sg;
html += `
${teamsConfigF[team.id].name}
`;
});
tbody.innerHTML = html;
}
// Script protegido para carregar com segurança
if (document.readyState === ‘complete’ || document.readyState === ‘interactive’) {
initSimulatorF();
} else {
document.addEventListener(‘DOMContentLoaded’, initSimulatorF);
}
})();
/* ]]> */
E aí, como ficou a sua simulação? O Verdão passou em primeiro ou com emoção na última rodada? Tire um print e compartilhe nos grupos!
➡️ Líder ou sufoco? Faça as contas no Simulador do Flamengo na Libertadores
➡️ Simulador do Corinthians: como irá o Timão na Fase de Grupos da Libertadores?