nodebb-plugin-ezoic-infinite 1.4.46 → 1.4.47

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/public/client.js +7 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-ezoic-infinite",
3
- "version": "1.4.46",
3
+ "version": "1.4.47",
4
4
  "description": "Production-ready Ezoic infinite ads integration for NodeBB 4.x",
5
5
  "main": "library.js",
6
6
  "license": "MIT",
package/public/client.js CHANGED
@@ -556,8 +556,13 @@
556
556
 
557
557
  // CRITIQUE: Annuler TOUS les timeouts en cours pour éviter que les anciens
558
558
  // showAds() continuent à s'exécuter après la navigation
559
- state.activeTimeouts.forEach(id => clearTimeout(id));
559
+ state.activeTimeouts.forEach(id => {
560
+ try { clearTimeout(id); } catch (e) {}
561
+ });
560
562
  state.activeTimeouts.clear();
563
+
564
+ // Vider aussi pendingById pour annuler les showAds en attente
565
+ state.pendingById.clear();
561
566
 
562
567
  if (state.obs) { state.obs.disconnect(); state.obs = null; }
563
568
  state.canShowAds = false;
@@ -673,7 +678,7 @@
673
678
  state.canShowAds = false;
674
679
  setTimeout(() => {
675
680
  state.canShowAds = true;
676
- }, 500);
681
+ }, 2000);
677
682
  });
678
683
 
679
684
  $(window).on('action:category.loaded.ezoicInfinite', () => {