nodebb-plugin-ezoic-infinite 1.4.80 → 1.4.82
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 +14 -5
package/package.json
CHANGED
package/public/client.js
CHANGED
|
@@ -283,11 +283,15 @@
|
|
|
283
283
|
if (typeof ez.showAds !== 'function') return;
|
|
284
284
|
|
|
285
285
|
window.__nodebbEzoicPatched = true;
|
|
286
|
+
console.log('[NODEBB-EZOIC] Patch Ezoic appliqué !');
|
|
286
287
|
const orig = ez.showAds;
|
|
287
288
|
|
|
288
289
|
ez.showAds = function (arg) {
|
|
290
|
+
console.log('[NODEBB-EZOIC] showAds() appelé, arg:', arg, 'BLOCKED:', EZOIC_BLOCKED);
|
|
291
|
+
|
|
289
292
|
// CRITIQUE: Bloquer TOUS appels si navigation en cours
|
|
290
293
|
if (EZOIC_BLOCKED) {
|
|
294
|
+
console.log('[NODEBB-EZOIC] showAds() BLOQUÉ par flag');
|
|
291
295
|
return; // Ignorer complètement
|
|
292
296
|
}
|
|
293
297
|
|
|
@@ -626,11 +630,14 @@
|
|
|
626
630
|
}
|
|
627
631
|
|
|
628
632
|
function cleanup() {
|
|
633
|
+
// DEBUG: Vérifier que cleanup est appelé
|
|
634
|
+
console.log('[NODEBB-EZOIC] cleanup() appelé');
|
|
635
|
+
|
|
629
636
|
// CRITIQUE: BLOQUER Ezoic immédiatement
|
|
630
637
|
EZOIC_BLOCKED = true;
|
|
638
|
+
console.log('[NODEBB-EZOIC] EZOIC_BLOCKED = true');
|
|
631
639
|
|
|
632
640
|
// Détruire TOUS les placeholders Ezoic AVANT de supprimer DOM
|
|
633
|
-
// Pour annuler la queue interne d'Ezoic
|
|
634
641
|
const allWrappers = document.querySelectorAll('.ezoic-ad');
|
|
635
642
|
const allIds = [];
|
|
636
643
|
allWrappers.forEach(wrapper => {
|
|
@@ -641,12 +648,14 @@
|
|
|
641
648
|
}
|
|
642
649
|
});
|
|
643
650
|
|
|
644
|
-
// CRITIQUE:
|
|
645
|
-
// Pour que
|
|
646
|
-
|
|
651
|
+
// CRITIQUE: Vider COMPLÈTEMENT sessionDefinedIds
|
|
652
|
+
// Pour éviter que d'anciens IDs soient encore en mémoire
|
|
653
|
+
console.log('[NODEBB-EZOIC] Suppression IDs du DOM:', allIds);
|
|
654
|
+
console.log('[NODEBB-EZOIC] Vidage COMPLET de sessionDefinedIds');
|
|
655
|
+
sessionDefinedIds.clear(); // ✅ VIDER TOUT
|
|
647
656
|
|
|
648
657
|
if (allIds.length > 0) {
|
|
649
|
-
destroyPlaceholderIds(allIds);
|
|
658
|
+
destroyPlaceholderIds(allIds);
|
|
650
659
|
}
|
|
651
660
|
|
|
652
661
|
// Annuler batch showAds en attente
|