diff --git a/public/team-block-script.js b/public/team-block-script.js index a5b3339..0cc0038 100644 --- a/public/team-block-script.js +++ b/public/team-block-script.js @@ -1,36 +1,19 @@ -// SCRIPT ANTI-ÉQUIPE - CHARGÉ EN PREMIER +// SCRIPT ÉQUIPE - REDIRECTION VERS team.html (function() { 'use strict'; - // DÉTECTION PAGE ÉQUIPE - var isTeamPage = window.location.pathname === '/team' || - window.location.pathname === '/team/' || - window.location.pathname.startsWith('/team/') || - window.location.href.includes('/team'); + // 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 (isTeamPage) { - console.log('🚫 BLOQUEUR ÉQUIPE ACTIF - Page équipe détectée'); - - // Bloquer les scripts qui interfèrent avec la page équipe - window.__blockTeamPages = true; - - // Permettre quand même les scripts essentiels pour la navigation - var originalAppendChild = Element.prototype.appendChild; - Element.prototype.appendChild = function(child) { - if (child.tagName === 'SCRIPT' && child.src) { - // Bloquer seulement strategie-script.js qui cause les problèmes - if (child.src.includes('strategie-script.js')) { - console.log('🚫 Script strategie-script.js BLOQUÉ sur page équipe'); - return child; // Ne pas l'ajouter - } - // Permettre les autres scripts (navigation, etc.) - } - return originalAppendChild.call(this, child); - }; - - console.log('✅ Navigation et scripts essentiels autorisés sur page équipe'); + if (isTeamRoute && !isTeamHtml) { + console.log('🔄 ÉQUIPE: Redirection vers /team.html'); + window.location.replace('/team.html'); return; } - console.log('✅ Page normale détectée - tous scripts autorisés'); + if (isTeamHtml) { + console.log('✅ ÉQUIPE: Page team.html chargée directement'); + } })();