nodebb-plugin-ezoic-infinite 1.8.75 → 1.8.77
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 +7 -5
package/package.json
CHANGED
package/public/client.js
CHANGED
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
EMPTY_CHECK_MS_1: 30_000,
|
|
27
27
|
EMPTY_CHECK_MS_2: 60_000,
|
|
28
28
|
MIN_PRUNE_AGE_MS: 8_000,
|
|
29
|
-
RECYCLE_MIN_AGE_MS:
|
|
30
|
-
SHOW_THROTTLE_MS:
|
|
29
|
+
RECYCLE_MIN_AGE_MS: 8_000,
|
|
30
|
+
SHOW_THROTTLE_MS: 500,
|
|
31
31
|
BURST_COOLDOWN_MS: 200,
|
|
32
32
|
BLOCK_DURATION_MS: 1_500,
|
|
33
33
|
SHOW_TIMEOUT_MS: 7_000,
|
|
34
34
|
SHOW_RELEASE_MS: 700,
|
|
35
|
-
RECYCLE_DELAY_MS:
|
|
35
|
+
RECYCLE_DELAY_MS: 300,
|
|
36
36
|
UNCOLLAPSE_CHECK_MS: [500, 3_000, 10_000],
|
|
37
37
|
};
|
|
38
38
|
|
|
@@ -298,7 +298,7 @@
|
|
|
298
298
|
if (typeof ez?.destroyPlaceholders !== 'function' ||
|
|
299
299
|
typeof ez?.showAds !== 'function') return null;
|
|
300
300
|
|
|
301
|
-
const threshold = -(
|
|
301
|
+
const threshold = -(5 * (window.innerHeight || 800));
|
|
302
302
|
const t = now();
|
|
303
303
|
let bestEmpty = null, bestEmptyY = Infinity;
|
|
304
304
|
let bestFull = null, bestFullY = Infinity;
|
|
@@ -309,7 +309,9 @@
|
|
|
309
309
|
for (const wrap of wraps) {
|
|
310
310
|
try {
|
|
311
311
|
const created = parseInt(wrap.getAttribute(ATTR.CREATED) || '0', 10);
|
|
312
|
-
|
|
312
|
+
const shown = parseInt(wrap.getAttribute(ATTR.SHOWN) || '0', 10);
|
|
313
|
+
const refTs = shown > 0 ? Math.max(created, shown) : created;
|
|
314
|
+
if (t - refTs < TIMING.RECYCLE_MIN_AGE_MS) continue;
|
|
313
315
|
const bottom = wrap.getBoundingClientRect().bottom;
|
|
314
316
|
if (bottom > threshold) continue;
|
|
315
317
|
if (!isFilled(wrap)) {
|