nodebb-plugin-ezoic-infinite 1.4.82 → 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 +21 -2
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() {
|
|
@@ -651,11 +659,22 @@
|
|
|
651
659
|
// CRITIQUE: Vider COMPLÈTEMENT sessionDefinedIds
|
|
652
660
|
// Pour éviter que d'anciens IDs soient encore en mémoire
|
|
653
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);
|
|
654
673
|
console.log('[NODEBB-EZOIC] Vidage COMPLET de sessionDefinedIds');
|
|
655
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
|