nodebb-plugin-ezoic-infinite 1.4.77 → 1.4.78
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 +19 -4
package/package.json
CHANGED
package/public/client.js
CHANGED
|
@@ -611,13 +611,28 @@
|
|
|
611
611
|
}
|
|
612
612
|
|
|
613
613
|
function cleanup() {
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
614
|
+
// CRITIQUE: Détruire TOUS les placeholders Ezoic AVANT de supprimer DOM
|
|
615
|
+
// Pour annuler la queue interne d'Ezoic
|
|
616
|
+
const allWrappers = document.querySelectorAll('.ezoic-ad');
|
|
617
|
+
const allIds = [];
|
|
618
|
+
allWrappers.forEach(wrapper => {
|
|
619
|
+
const ph = wrapper.querySelector('[id^="ezoic-pub-ad-placeholder-"]');
|
|
620
|
+
if (ph) {
|
|
621
|
+
const match = ph.id.match(/\d+/);
|
|
622
|
+
if (match) allIds.push(parseInt(match[0]));
|
|
623
|
+
}
|
|
624
|
+
});
|
|
625
|
+
|
|
626
|
+
if (allIds.length > 0) {
|
|
627
|
+
destroyPlaceholderIds(allIds); // Dire à Ezoic d'arrêter
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
// Annuler batch showAds en attente
|
|
617
631
|
pendingShowAdsIds.clear();
|
|
618
632
|
clearTimeout(batchShowAdsTimer);
|
|
619
633
|
|
|
620
|
-
|
|
634
|
+
// Maintenant supprimer DOM
|
|
635
|
+
allWrappers.forEach(el => {
|
|
621
636
|
try { el.remove(); } catch (e) {}
|
|
622
637
|
});
|
|
623
638
|
|