nodebb-plugin-ezoic-infinite 1.4.32 → 1.4.33

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 +5 -17
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-ezoic-infinite",
3
- "version": "1.4.32",
3
+ "version": "1.4.33",
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
@@ -328,9 +328,6 @@
328
328
 
329
329
  function callShowAdsWhenReady(id) {
330
330
  if (!id) return;
331
- if (window.location.pathname !== '/') {
332
- console.log('[AJAXIFY] callShowAdsWhenReady ID:', id);
333
- }
334
331
 
335
332
  const now = Date.now(), last = state.lastShowById.get(id) || 0;
336
333
  if (now - last < 3500) return;
@@ -357,9 +354,6 @@
357
354
  attempts += 1;
358
355
  const el = document.getElementById(phId);
359
356
  if (el && el.isConnected) {
360
- if (window.location.pathname !== '/') {
361
- console.log('[AJAXIFY] Placeholder', id, 'trouvé, appel showAds');
362
- }
363
357
  // Si doCall() réussit, Ezoic est chargé et showAds a été appelé → sortir
364
358
  if (doCall()) {
365
359
  state.pendingById.delete(id); // nettoyage au cas où
@@ -559,8 +553,6 @@
559
553
  }
560
554
 
561
555
  async function runCore() {
562
- const isAjaxify = window.location.pathname !== '/';
563
- if (isAjaxify) console.log('[AJAXIFY] runCore - pageKey:', state.pageKey);
564
556
  patchShowAds();
565
557
 
566
558
  const cfg = await fetchConfig();
@@ -597,9 +589,6 @@
597
589
  }
598
590
  }
599
591
 
600
- if (window.location.pathname !== '/') {
601
- console.log('[AJAXIFY] Inserted:', inserted, 'wrappers. Items count:', count);
602
- }
603
592
 
604
593
  enforceNoAdjacentAds();
605
594
 
@@ -651,7 +640,6 @@
651
640
  $(window).on('action:ajaxify.start.ezoicInfinite', () => cleanup());
652
641
 
653
642
  $(window).on('action:ajaxify.end.ezoicInfinite', () => {
654
- console.log('[AJAXIFY] ajaxify.end - juste update pageKey');
655
643
  state.pageKey = getPageKey();
656
644
  ensureObserver();
657
645
  // NE RIEN FAIRE d'autre ici
@@ -661,23 +649,23 @@
661
649
  $(window).on('action:category.loaded.ezoicInfinite', () => {
662
650
  ensureObserver();
663
651
  // category.loaded = infinite scroll, Ezoic déjà chargé normalement
664
- setTimeout(scheduleRun, 300);
652
+ setTimeout(scheduleRun, 800);
665
653
  });
666
654
 
667
655
  $(window).on('action:topics.loaded.ezoicInfinite', () => {
668
656
  ensureObserver();
669
- setTimeout(scheduleRun, 300);
657
+ setTimeout(scheduleRun, 800);
670
658
  });
671
659
 
672
660
  $(window).on('action:topic.loaded.ezoicInfinite', () => {
673
661
  ensureObserver();
674
- setTimeout(scheduleRun, 300);
662
+ setTimeout(scheduleRun, 600);
675
663
  });
676
664
 
677
665
  $(window).on('action:posts.loaded.ezoicInfinite', () => {
678
666
  ensureObserver();
679
667
  // posts.loaded = infinite scroll
680
- setTimeout(scheduleRun, 400);
668
+ setTimeout(scheduleRun, 800);
681
669
  });
682
670
  }
683
671
 
@@ -712,7 +700,7 @@
712
700
  if (window.ezstandalone && typeof window.ezstandalone.showAds === 'function') {
713
701
  // Ezoic est prêt → lancer l'insertion
714
702
  scheduleRun();
715
- setTimeout(scheduleRun, 300);
703
+ setTimeout(scheduleRun, 800);
716
704
  return;
717
705
  }
718
706
  // Ezoic pas encore prêt