nodebb-plugin-ezoic-infinite 1.7.47 → 1.7.49

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 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-ezoic-infinite",
3
- "version": "1.7.47",
3
+ "version": "1.7.49",
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
@@ -526,6 +526,9 @@
526
526
  const wrap = ph?.closest?.(`.${WRAP_CLASS}`);
527
527
  if (!wrap || !ph?.isConnected) return;
528
528
  if (parseInt(wrap.getAttribute(A_SHOWN) || '0', 10) > showTs) return;
529
+ // is-empty désactivé pour ezoic-ad-between : Ezoic peut prendre >20s
530
+ // à charger sur liste de catégorie — collapse prématuré des wraps.
531
+ if (wrap.classList.contains('ezoic-ad-between')) return;
529
532
  wrap.classList.toggle('is-empty', !isFilled(ph));
530
533
  } catch (_) {}
531
534
  }, EMPTY_CHECK_MS);
@@ -760,9 +763,10 @@
760
763
  $(window).on('action:ajaxify.end.nbbEzoic', () => {
761
764
  S.pageKey = pageKey();
762
765
  blockedUntil = 0;
763
- // Fix #4 : muteConsole/ensureTcfLocator/warmNetwork déjà appelés au boot
764
- // et sont idempotents pas besoin de les rappeler à chaque navigation.
765
- muteConsole();
766
+ // muteConsole et warmNetwork sont idempotents — appelés au boot seulement.
767
+ // ensureTcfLocator doit être rappelé : ajaxify retire l'iframe __tcfapiLocator
768
+ // du DOM à chaque navigation, le CMP lève une erreur postMessage sans elle.
769
+ muteConsole(); ensureTcfLocator();
766
770
  patchShowAds(); getIO(); ensureDomObserver(); requestBurst();
767
771
  });
768
772