fix: correction popstate pour /team et amélioration regex détection liens
- Gestion du popstate pour la route /team - Amélioration du script Python avec regex pour détecter tous les formats de liens team - La fonction showTeamPage() est maintenant appelée correctement lors de la navigation
This commit is contained in:
@@ -253,8 +253,9 @@ try:
|
||||
line = lines[i]
|
||||
|
||||
# Détecter le début d'un lien Équipe (inclut /team, /team/, /team.html)
|
||||
# Vérifier aussi si c'est dans un commentaire ou sur plusieurs lignes
|
||||
if ('href="/team' in line or "href='/team" in line or 'href={"/team' in line or "href={'/team" in line) and not skip_team_link:
|
||||
# Utiliser une regex pour détecter tous les formats possibles
|
||||
team_link_match = re.search(r'href=["\']/?team(/|\.html)?["\']|href=\{["\']/?team', line)
|
||||
if team_link_match and not skip_team_link:
|
||||
skip_team_link = True
|
||||
team_links_removed += 1
|
||||
# Ignorer cette ligne et les lignes suivantes jusqu'à </li>
|
||||
|
||||
@@ -917,7 +917,11 @@ Interface de pilotage pour les responsables sécurité des PME.
|
||||
|
||||
window.addEventListener('popstate', function(event) {
|
||||
if (event.state && event.state.page) {
|
||||
showPage(event.state.page);
|
||||
if (event.state.page === 'team') {
|
||||
showTeamPage();
|
||||
} else {
|
||||
showPage(event.state.page);
|
||||
}
|
||||
} else if (window.originalBodyContent) {
|
||||
document.body.innerHTML = window.originalBodyContent;
|
||||
// Réinitialiser le flag pour permettre la réinitialisation
|
||||
|
||||
Reference in New Issue
Block a user