nodebb-plugin-ezoic-infinite 1.4.79 → 1.4.80
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 +11 -0
package/package.json
CHANGED
package/public/client.js
CHANGED
|
@@ -410,6 +410,13 @@
|
|
|
410
410
|
|
|
411
411
|
clearTimeout(batchShowAdsTimer);
|
|
412
412
|
batchShowAdsTimer = setTimeout(() => {
|
|
413
|
+
// CRITIQUE: Vérifier que nous sommes toujours sur la même page
|
|
414
|
+
const currentPageKey = getPageKey();
|
|
415
|
+
if (state.pageKey && currentPageKey !== state.pageKey) {
|
|
416
|
+
pendingShowAdsIds.clear();
|
|
417
|
+
return; // Page a changé, annuler
|
|
418
|
+
}
|
|
419
|
+
|
|
413
420
|
if (pendingShowAdsIds.size === 0) return;
|
|
414
421
|
|
|
415
422
|
const idsArray = Array.from(pendingShowAdsIds);
|
|
@@ -634,6 +641,10 @@
|
|
|
634
641
|
}
|
|
635
642
|
});
|
|
636
643
|
|
|
644
|
+
// CRITIQUE: Supprimer IDs de sessionDefinedIds IMMÉDIATEMENT
|
|
645
|
+
// Pour que le filtre validIds ne les trouve pas
|
|
646
|
+
allIds.forEach(id => sessionDefinedIds.delete(id));
|
|
647
|
+
|
|
637
648
|
if (allIds.length > 0) {
|
|
638
649
|
destroyPlaceholderIds(allIds); // Dire à Ezoic d'arrêter
|
|
639
650
|
}
|