nodebb-plugin-ezoic-infinite 1.7.72 → 1.7.74
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.
- package/package.json +1 -1
- package/public/client.js +19 -8
- package/public/style.css +1 -7
package/package.json
CHANGED
package/public/client.js
CHANGED
|
@@ -280,17 +280,28 @@
|
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
function watchFill(id, wrap) {
|
|
283
|
-
//
|
|
284
|
-
//
|
|
283
|
+
// Surveille le placeholder pour détecter un vrai fill, y compris les iframes
|
|
284
|
+
// AMP cross-origin invisibles depuis le DOM parent.
|
|
285
|
+
// Critères : iframe présente, OU container Google avec height > 0.
|
|
285
286
|
const ph = document.getElementById(`${PH_PREFIX}${id}`);
|
|
286
287
|
if (!ph) return;
|
|
287
|
-
const
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
288
|
+
const check = () => {
|
|
289
|
+
// iframe ou ins = pub réelle
|
|
290
|
+
if (ph.querySelector('iframe, ins')) { wrap.setAttribute('data-ez-filled', '1'); obs.disconnect(); return; }
|
|
291
|
+
// container Google avec hauteur > 0 = pub réelle
|
|
292
|
+
const containers = ph.querySelectorAll('[id*="__container__"]');
|
|
293
|
+
for (const c of containers) {
|
|
294
|
+
const h = parseInt(c.style.height, 10);
|
|
295
|
+
if (h > 0) { wrap.setAttribute('data-ez-filled', '1'); obs.disconnect(); return; }
|
|
291
296
|
}
|
|
292
|
-
|
|
293
|
-
|
|
297
|
+
// container présent mais height:0 = no-fill confirmé → is-empty
|
|
298
|
+
if (containers.length > 0) {
|
|
299
|
+
const allZero = [...containers].every(c => parseInt(c.style.height, 10) === 0);
|
|
300
|
+
if (allZero) { wrap.classList.add('is-empty'); obs.disconnect(); }
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
const obs = new MutationObserver(check);
|
|
304
|
+
obs.observe(ph, { childList: true, subtree: true, attributes: true, attributeFilter: ['style'] });
|
|
294
305
|
}
|
|
295
306
|
|
|
296
307
|
function insertAfter(el, id, klass, key) {
|
package/public/style.css
CHANGED
|
@@ -72,13 +72,7 @@
|
|
|
72
72
|
injecte un conteneur vide mais ne sert pas de pub.
|
|
73
73
|
*/
|
|
74
74
|
.nodebb-ezoic-wrap.is-empty {
|
|
75
|
-
display:
|
|
76
|
-
height: 0 !important;
|
|
77
|
-
min-height: 0 !important;
|
|
78
|
-
max-height: 0 !important;
|
|
79
|
-
margin: 0 !important;
|
|
80
|
-
padding: 0 !important;
|
|
81
|
-
overflow: hidden !important;
|
|
75
|
+
display: none !important;
|
|
82
76
|
}
|
|
83
77
|
|
|
84
78
|
/* ── Ezoic global (hors de nos wraps) ────────────────────────────────────── */
|