nodebb-plugin-ezoic-infinite 1.4.62 → 1.4.63

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 +10 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-ezoic-infinite",
3
- "version": "1.4.62",
3
+ "version": "1.4.63",
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
@@ -216,7 +216,7 @@
216
216
  return wrap;
217
217
  } finally {
218
218
  // Libérer le lock après 100ms (le temps que le DOM soit stable)
219
- setTimeout(() => insertingIds.delete(id), 100);
219
+ setTimeout(() => insertingIds.delete(id), 50);
220
220
  }
221
221
  }
222
222
 
@@ -496,13 +496,14 @@
496
496
  // Attendre que le wrapper soit dans le DOM puis appeler showAds
497
497
  setTimeout(() => {
498
498
  callShowAdsWhenReady(id);
499
- }, 1500);
499
+ }, 50);
500
500
  } else {
501
501
  usedSet.add(id);
502
502
  wrap = insertAfter(el, id, kindClass, afterPos);
503
503
  if (!wrap) continue;
504
504
  // Micro-délai pour laisser le DOM se synchroniser
505
- setTimeout(() => callShowAdsWhenReady(id), 10);
505
+ // Appel immédiat au lieu de 10ms delay
506
+ callShowAdsWhenReady(id);
506
507
  }
507
508
 
508
509
  liveArr.push({ id, wrap });
@@ -556,7 +557,6 @@
556
557
  });
557
558
 
558
559
  state.pageKey = getPageKey();
559
- state.navigationCounter = (state.navigationCounter || 0) + 1;
560
560
  state.cfg = null;
561
561
  state.cfgPromise = null;
562
562
 
@@ -650,20 +650,20 @@
650
650
  else if (kind === 'categories') count = getCategoryItems().length;
651
651
 
652
652
  if (count === 0 && 0 < 25) {
653
- setTimeout(() => scheduleRun('await-items'), 120);
653
+ setTimeout(arguments[0], 50);
654
654
  return;
655
655
  }
656
656
 
657
657
  if (inserted >= MAX_INSERTS_PER_RUN) {
658
658
  // Plus d'insertions possibles ce cycle, continuer immédiatement
659
- setTimeout(() => scheduleRun('continue'), 140);
659
+ setTimeout(arguments[0], 50);
660
660
  } else if (inserted === 0 && count > 0) {
661
661
  // Pool épuisé ou recyclage pas encore disponible.
662
662
  // Réessayer jusqu'à 8 fois (toutes les 400ms) pour laisser aux anciens wrappers
663
663
  // le temps de défiler hors écran et devenir recyclables.
664
664
  if (state.poolWaitAttempts < 8) {
665
665
  state.poolWaitAttempts += 1;
666
- setTimeout(() => scheduleRun('pool-wait'), 400);
666
+ setTimeout(arguments[0], 50);
667
667
  } else {
668
668
  }
669
669
  } else if (inserted > 0) {
@@ -680,7 +680,7 @@
680
680
  const pk = getPageKey();
681
681
  if (state.pageKey && pk !== state.pageKey) return;
682
682
  runCore().catch(() => {});
683
- }, 80);
683
+ }, 50);
684
684
  }
685
685
 
686
686
  function bind() {
@@ -769,7 +769,7 @@
769
769
  }
770
770
 
771
771
  // Réessayer dans 200ms
772
- setTimeout(check, 200);
772
+ setTimeout(check, 50);
773
773
  })();
774
774
  }
775
775
 
@@ -794,7 +794,7 @@
794
794
  return;
795
795
  }
796
796
  // Réessayer dans 200ms
797
- setTimeout(check, 200);
797
+ setTimeout(check, 50);
798
798
  })();
799
799
  }
800
800