nodebb-plugin-ezoic-infinite 1.4.41 → 1.4.42

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 +13 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-ezoic-infinite",
3
- "version": "1.4.41",
3
+ "version": "1.4.42",
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
@@ -335,6 +335,19 @@
335
335
  try {
336
336
  window.ezstandalone = window.ezstandalone || {};
337
337
  if (typeof window.ezstandalone.showAds === 'function') {
338
+ // DEBUG: Logger infos du placeholder avant showAds
339
+ const ph = document.getElementById(phId);
340
+ if (ph) {
341
+ const wrapper = ph.closest('.ezoic-ad');
342
+ const wordCount = (document.body.innerText || '').split(/\s+/).length;
343
+ console.log('[UNUSED?] ID', id, {
344
+ inDOM: !!ph,
345
+ visible: ph.offsetHeight > 0,
346
+ wordCount: wordCount,
347
+ wrapperClass: wrapper ? wrapper.className : 'no-wrapper',
348
+ viewport: window.innerHeight
349
+ });
350
+ }
338
351
  state.lastShowById.set(id, Date.now());
339
352
  window.ezstandalone.showAds(id);
340
353
  return true;