nodebb-plugin-ezoic-infinite 1.4.81 → 1.4.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/client.js +26 -7
package/package.json
CHANGED
package/public/client.js
CHANGED
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
// FLAG GLOBAL: Bloquer Ezoic pendant navigation
|
|
12
12
|
let EZOIC_BLOCKED = false;
|
|
13
|
+
|
|
14
|
+
// DEBUG: Vérifier que le plugin charge
|
|
15
|
+
console.log('[NODEBB-EZOIC] Plugin chargé et initialisé');
|
|
16
|
+
console.log('[NODEBB-EZOIC] EZOIC_BLOCKED initial:', EZOIC_BLOCKED);
|
|
13
17
|
|
|
14
18
|
const sessionDefinedIds = new Set();
|
|
15
19
|
|
|
@@ -436,6 +440,10 @@
|
|
|
436
440
|
|
|
437
441
|
// Appeler showAds avec TOUS les IDs en une fois
|
|
438
442
|
try {
|
|
443
|
+
// CRITIQUE: Re-patcher AVANT chaque appel pour être sûr
|
|
444
|
+
console.log('[NODEBB-EZOIC] Re-patch avant showAds');
|
|
445
|
+
patchShowAds();
|
|
446
|
+
|
|
439
447
|
window.ezstandalone = window.ezstandalone || {};
|
|
440
448
|
window.ezstandalone.cmd = window.ezstandalone.cmd || [];
|
|
441
449
|
window.ezstandalone.cmd.push(function() {
|
|
@@ -638,7 +646,6 @@
|
|
|
638
646
|
console.log('[NODEBB-EZOIC] EZOIC_BLOCKED = true');
|
|
639
647
|
|
|
640
648
|
// Détruire TOUS les placeholders Ezoic AVANT de supprimer DOM
|
|
641
|
-
// Pour annuler la queue interne d'Ezoic
|
|
642
649
|
const allWrappers = document.querySelectorAll('.ezoic-ad');
|
|
643
650
|
const allIds = [];
|
|
644
651
|
allWrappers.forEach(wrapper => {
|
|
@@ -649,13 +656,25 @@
|
|
|
649
656
|
}
|
|
650
657
|
});
|
|
651
658
|
|
|
652
|
-
// CRITIQUE:
|
|
653
|
-
// Pour que
|
|
654
|
-
console.log('[NODEBB-EZOIC] Suppression IDs
|
|
655
|
-
|
|
659
|
+
// CRITIQUE: Vider COMPLÈTEMENT sessionDefinedIds
|
|
660
|
+
// Pour éviter que d'anciens IDs soient encore en mémoire
|
|
661
|
+
console.log('[NODEBB-EZOIC] Suppression IDs du DOM:', allIds);
|
|
662
|
+
|
|
663
|
+
// CRITIQUE: Détruire AUSSI tous les IDs tracés dans state
|
|
664
|
+
// Pour annuler les anciens IDs qu'Ezoic a en mémoire
|
|
665
|
+
const trackedIds = [
|
|
666
|
+
...Array.from(state.usedTopics),
|
|
667
|
+
...Array.from(state.usedPosts),
|
|
668
|
+
...Array.from(state.usedCategories)
|
|
669
|
+
];
|
|
670
|
+
|
|
671
|
+
const allIdsToDestroy = [...new Set([...allIds, ...trackedIds, ...Array.from(sessionDefinedIds)])];
|
|
672
|
+
console.log('[NODEBB-EZOIC] Destroy TOUS les IDs tracés:', allIdsToDestroy);
|
|
673
|
+
console.log('[NODEBB-EZOIC] Vidage COMPLET de sessionDefinedIds');
|
|
674
|
+
sessionDefinedIds.clear(); // ✅ VIDER TOUT
|
|
656
675
|
|
|
657
|
-
if (
|
|
658
|
-
destroyPlaceholderIds(
|
|
676
|
+
if (allIdsToDestroy.length > 0) {
|
|
677
|
+
destroyPlaceholderIds(allIdsToDestroy);
|
|
659
678
|
}
|
|
660
679
|
|
|
661
680
|
// Annuler batch showAds en attente
|