nodebb-plugin-ezoic-infinite 1.4.84 → 1.4.86

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 +12 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-ezoic-infinite",
3
- "version": "1.4.84",
3
+ "version": "1.4.86",
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
@@ -721,6 +721,12 @@
721
721
  }
722
722
 
723
723
  async function runCore() {
724
+ // CRITIQUE: Ne rien insérer si navigation en cours
725
+ if (EZOIC_BLOCKED) {
726
+ console.log('[NODEBB-EZOIC] runCore bloqué - navigation en cours');
727
+ return;
728
+ }
729
+
724
730
  if (!state.canShowAds) {
725
731
  return;
726
732
  }
@@ -809,14 +815,17 @@
809
815
  $(window).on('action:ajaxify.end.ezoicInfinite', () => {
810
816
  state.pageKey = getPageKey();
811
817
 
812
- // Débloquer Ezoic après délai pour laisser DOM se stabiliser
813
- setTimeout(() => {
818
+ // Débloquer Ezoic IMMÉDIATEMENT pour la nouvelle page
819
+ console.log('[NODEBB-EZOIC] ajaxify.end - Déblocage Ezoic');
814
820
  EZOIC_BLOCKED = false;
815
- }, 200);
816
821
 
817
822
  ensureObserver();
818
823
 
819
824
  state.canShowAds = true;
825
+
826
+ // CRITIQUE: Relancer insertion maintenant que navigation est terminée
827
+ console.log('[NODEBB-EZOIC] Relancer insertion pubs');
828
+ scheduleRun();
820
829
  });
821
830
 
822
831
  $(window).on('action:category.loaded.ezoicInfinite', () => {