nodebb-plugin-ezoic-infinite 1.7.76 → 1.7.77

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 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-ezoic-infinite",
3
- "version": "1.7.76",
3
+ "version": "1.7.77",
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
@@ -387,11 +387,12 @@
387
387
  const ph = document.getElementById(`${PH_PREFIX}${id}`);
388
388
  const wrap = ph?.closest?.(`.${WRAP_CLASS}`);
389
389
  if (!wrap || !ph?.isConnected) return;
390
- // Ne pas colapser si le wrap a une hauteur visible (pub AMP cross-origin)
391
- if (wrap.offsetHeight > 10) return;
392
- // Ne pas colapser si data-ez-filled (pub détectée par watchFill)
390
+ // Ne pas colapser si watchFill a détecté une vraie pub (iframe/ins)
393
391
  if (wrap.getAttribute('data-ez-filled')) return;
394
- if (!isFilled(wrap)) wrap.classList.add('is-empty');
392
+ // Ne pas colapser si une iframe est présente (pub AMP cross-origin)
393
+ if (wrap.querySelector('iframe, ins')) return;
394
+ // Pas de pub détectée → collapse
395
+ wrap.classList.add('is-empty');
395
396
  } catch (_) {}
396
397
  }, EMPTY_CHECK_MS);
397
398
  }