- Nouveau script team-block-script.js chargé en premier (config-business.json) - Bloqueur absolu qui empêche tout autre script sur /team - Page team.tsx encore plus agressive (remplacement useEffect) - Double protection dans strategie-script.js - Script principal bloqué si __blockTeamPages=true Cette approche à couches multiples devrait définitivement résoudre : - Les deux liens équipe (1 seul) - L'affichage radar au lieu des visualisations
31 lines
1.0 KiB
JavaScript
31 lines
1.0 KiB
JavaScript
// SCRIPT ANTI-ÉQUIPE - CHARGÉ EN PREMIER
|
|
(function() {
|
|
'use strict';
|
|
|
|
// BLOQUER ABSOLUMENT TOUTES LES PAGES ÉQUIPE
|
|
if (window.location.pathname === '/team' ||
|
|
window.location.pathname === '/team/' ||
|
|
window.location.pathname.startsWith('/team/') ||
|
|
window.location.href.includes('/team')) {
|
|
|
|
console.log('🚫 BLOQUEUR ÉQUIPE ACTIF - Page équipe détectée');
|
|
|
|
// Empêcher tout autre script de s'exécuter
|
|
window.__blockTeamPages = true;
|
|
|
|
// Bloquer immédiatement tout chargement de script
|
|
var originalAppendChild = Element.prototype.appendChild;
|
|
Element.prototype.appendChild = function(child) {
|
|
if (child.tagName === 'SCRIPT' && child.src && child.src.includes('strategie-script.js')) {
|
|
console.log('🚫 Script strategie-script.js BLOQUÉ sur page équipe');
|
|
return child; // Ne pas l'ajouter
|
|
}
|
|
return originalAppendChild.call(this, child);
|
|
};
|
|
|
|
return; // Arrêt immédiat
|
|
}
|
|
|
|
console.log('✅ Page normale détectée - scripts autorisés');
|
|
})();
|