nodebb-plugin-ezoic-infinite 1.4.45 → 1.4.46

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 +2 -19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-ezoic-infinite",
3
- "version": "1.4.45",
3
+ "version": "1.4.46",
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
@@ -357,27 +357,10 @@
357
357
  const el = document.getElementById(phId);
358
358
  if (el && el.isConnected) {
359
359
  // CRITIQUE: Vérifier que le placeholder est VISIBLE
360
- // Ezoic refuse les placeholders invisibles (offsetHeight = 0)
361
- if (el.offsetHeight === 0 && attempts < 100) {
362
- // Pas encore visible, réessayer
363
- if (attempts % 10 === 0) {
364
- console.log('[OFFSET] ID', id, 'invisible après', attempts, 'tentatives, height:', el.offsetHeight, 'display:', window.getComputedStyle(el).display);
365
- }
366
- const timeoutId = setTimeout(waitForPh, 50);
367
- state.activeTimeouts.add(timeoutId);
368
- return;
369
- }
360
+
370
361
 
371
362
  // Si on arrive ici, soit visible, soit timeout
372
- if (el.offsetHeight === 0) {
373
- console.log('[OFFSET] ID', id, 'TIMEOUT après', attempts, 'tentatives - height:', el.offsetHeight, 'display:', window.getComputedStyle(el).display, 'parent:', el.parentElement?.tagName);
374
- }
375
-
376
- // Double-check pageKey juste avant doCall (au cas où cleanup appelé entre-temps)
377
- if (state.pageKey !== startPageKey) {
378
- // Note: les timeouts seront nettoyés par cleanup()
379
- return;
380
- }
363
+
381
364
 
382
365
  // Si doCall() réussit, Ezoic est chargé et showAds a été appelé → sortir
383
366
  if (doCall()) {