nodebb-plugin-ezoic-infinite 1.7.34 → 1.7.35
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 +12 -2
package/package.json
CHANGED
package/public/client.js
CHANGED
|
@@ -32,6 +32,13 @@
|
|
|
32
32
|
*
|
|
33
33
|
* v34 moveDistantWrap — voir v38.
|
|
34
34
|
*
|
|
35
|
+
* v42 Seuil de recyclage aligné sur IO_MARGIN par device :
|
|
36
|
+
* desktop → -(2500 + vh), mobile → -(3500 + vh).
|
|
37
|
+
* Un wrap dans la zone IO_MARGIN peut être re-observé après recyclage
|
|
38
|
+
* → conflit. On recycle uniquement au-delà de la marge d'observation.
|
|
39
|
+
*
|
|
40
|
+
* v41 Seuil -1vh (trop permissif sur mobile, ignorait IO_MARGIN).
|
|
41
|
+
*
|
|
35
42
|
* v40 Recyclage slots via destroyPlaceholders+define+displayMore avec délais.
|
|
36
43
|
* Séquence : destroy → 300ms → define → 300ms → displayMore.
|
|
37
44
|
* Testé manuellement : fonctionne. displayMore = API Ezoic infinite scroll.
|
|
@@ -303,8 +310,11 @@
|
|
|
303
310
|
typeof ez?.define !== 'function' ||
|
|
304
311
|
typeof ez?.displayMore !== 'function') return null;
|
|
305
312
|
|
|
306
|
-
const vh
|
|
307
|
-
|
|
313
|
+
const vh = window.innerHeight || 800;
|
|
314
|
+
// Seuil : au-delà de l'IO_MARGIN + 1vh pour être sûr que l'observer
|
|
315
|
+
// ne peut plus déclencher de showAds sur ce wrap après recyclage.
|
|
316
|
+
const margin = isMobile() ? 3500 : 2500;
|
|
317
|
+
const threshold = -(margin + vh);
|
|
308
318
|
let bestEmpty = null, bestEmptyBottom = Infinity;
|
|
309
319
|
let bestFilled = null, bestFilledBottom = Infinity;
|
|
310
320
|
|