nodebb-plugin-ezoic-infinite 1.7.73 → 1.7.75
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 +8 -6
package/package.json
CHANGED
package/public/client.js
CHANGED
|
@@ -280,17 +280,19 @@
|
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
function watchFill(id, wrap) {
|
|
283
|
-
//
|
|
284
|
-
// dès
|
|
283
|
+
// Détecte une vraie pub dans le placeholder, y compris iframes AMP cross-origin.
|
|
284
|
+
// On surveille les mutations — dès qu'une iframe ou ins apparaît, on marque filled.
|
|
285
|
+
// Les no-fills (containers height:0) sont gérés par scheduleEmptyCheck.
|
|
285
286
|
const ph = document.getElementById(`${PH_PREFIX}${id}`);
|
|
286
287
|
if (!ph) return;
|
|
287
|
-
const
|
|
288
|
-
if (ph.
|
|
288
|
+
const check = () => {
|
|
289
|
+
if (ph.querySelector('iframe, ins')) {
|
|
289
290
|
wrap.setAttribute('data-ez-filled', '1');
|
|
290
291
|
obs.disconnect();
|
|
291
292
|
}
|
|
292
|
-
}
|
|
293
|
-
obs
|
|
293
|
+
};
|
|
294
|
+
const obs = new MutationObserver(check);
|
|
295
|
+
obs.observe(ph, { childList: true, subtree: true });
|
|
294
296
|
}
|
|
295
297
|
|
|
296
298
|
function insertAfter(el, id, klass, key) {
|