nodebb-plugin-ezoic-infinite 1.7.35 → 1.7.36
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 +13 -9
package/package.json
CHANGED
package/public/client.js
CHANGED
|
@@ -32,10 +32,12 @@
|
|
|
32
32
|
*
|
|
33
33
|
* v34 moveDistantWrap — voir v38.
|
|
34
34
|
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
35
|
+
* v43 Seuil de recyclage abaissé à -vh (hors viewport visible).
|
|
36
|
+
* recycleAndMove appelle unobserve(ph) avant de déplacer le wrap,
|
|
37
|
+
* ce qui neutralise l'IO sur ce nœud — plus de risque de showAds
|
|
38
|
+
* parasite après recyclage. Plus de wraps éligibles = moins de pool sec.
|
|
39
|
+
*
|
|
40
|
+
* v42 Seuil -(IO_MARGIN + vh) (trop strict, peu de wraps éligibles).
|
|
39
41
|
*
|
|
40
42
|
* v41 Seuil -1vh (trop permissif sur mobile, ignorait IO_MARGIN).
|
|
41
43
|
*
|
|
@@ -310,11 +312,10 @@
|
|
|
310
312
|
typeof ez?.define !== 'function' ||
|
|
311
313
|
typeof ez?.displayMore !== 'function') return null;
|
|
312
314
|
|
|
313
|
-
const vh
|
|
314
|
-
// Seuil :
|
|
315
|
-
//
|
|
316
|
-
const
|
|
317
|
-
const threshold = -(margin + vh);
|
|
315
|
+
const vh = window.innerHeight || 800;
|
|
316
|
+
// Seuil : -1vh (hors viewport visible). On appelle unobserve(ph) juste
|
|
317
|
+
// après pour neutraliser l'IO — plus de showAds parasite possible.
|
|
318
|
+
const threshold = -vh;
|
|
318
319
|
let bestEmpty = null, bestEmptyBottom = Infinity;
|
|
319
320
|
let bestFilled = null, bestFilledBottom = Infinity;
|
|
320
321
|
|
|
@@ -336,6 +337,9 @@
|
|
|
336
337
|
if (!Number.isFinite(id)) return null;
|
|
337
338
|
|
|
338
339
|
const oldKey = best.getAttribute(A_ANCHOR);
|
|
340
|
+
// Neutraliser l'IO sur ce wrap avant déplacement — évite un showAds
|
|
341
|
+
// parasite si le nœud était encore dans la zone IO_MARGIN.
|
|
342
|
+
try { const ph = best.querySelector(`#${PH_PREFIX}${id}`); if (ph) S.io?.unobserve(ph); } catch (_) {}
|
|
339
343
|
mutate(() => {
|
|
340
344
|
best.setAttribute(A_ANCHOR, newKey);
|
|
341
345
|
best.setAttribute(A_CREATED, String(ts()));
|