- Supprime la logique de blocage complexe - Redirige simplement /team vers /team.html - Ne bloque plus si on est déjà sur team.html
20 lines
555 B
JavaScript
20 lines
555 B
JavaScript
// SCRIPT ÉQUIPE - REDIRECTION VERS team.html
|
|
(function() {
|
|
'use strict';
|
|
|
|
// DÉTECTION PAGE ÉQUIPE (mais PAS team.html)
|
|
var path = window.location.pathname;
|
|
var isTeamRoute = path === '/team' || path === '/team/' || path.startsWith('/team/');
|
|
var isTeamHtml = path === '/team.html';
|
|
|
|
if (isTeamRoute && !isTeamHtml) {
|
|
console.log('🔄 ÉQUIPE: Redirection vers /team.html');
|
|
window.location.replace('/team.html');
|
|
return;
|
|
}
|
|
|
|
if (isTeamHtml) {
|
|
console.log('✅ ÉQUIPE: Page team.html chargée directement');
|
|
}
|
|
})();
|