nodebb-plugin-ezoic-infinite 1.8.80 → 1.8.81

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/public/client.js +8 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-ezoic-infinite",
3
- "version": "1.8.80",
3
+ "version": "1.8.81",
4
4
  "description": "Production-ready Ezoic infinite ads integration for NodeBB 4.x",
5
5
  "main": "library.js",
6
6
  "license": "MIT",
package/public/client.js CHANGED
@@ -29,8 +29,8 @@
29
29
  RECYCLE_MIN_AGE_MS: 8_000,
30
30
  SHOW_THROTTLE_MS: 500,
31
31
  BURST_COOLDOWN_MS: 200,
32
- BLOCK_DURATION_MS: 1_500,
33
- SHOW_TIMEOUT_MS: 7_000,
32
+ BLOCK_DURATION_MS: 1_000,
33
+ SHOW_TIMEOUT_MS: 4_500,
34
34
  SHOW_RELEASE_MS: 700,
35
35
  RECYCLE_DELAY_MS: 300,
36
36
  UNCOLLAPSE_CHECK_MS: [500, 3_000, 10_000],
@@ -353,7 +353,7 @@
353
353
  });
354
354
  if (oldKey && S.wrapByKey.get(oldKey) === best) S.wrapByKey.delete(oldKey);
355
355
  S.wrapByKey.set(newKey, best);
356
- setTimeout(() => { observePh(id); enqueueShow(id); }, TIMING.RECYCLE_DELAY_MS);
356
+ requestAnimationFrame(() => { observePh(id); enqueueShow(id); });
357
357
  }, TIMING.RECYCLE_DELAY_MS);
358
358
  };
359
359
 
@@ -604,10 +604,15 @@
604
604
 
605
605
  // ── Core ───────────────────────────────────────────────────────────────────
606
606
 
607
+ let _lastGc = 0;
608
+
607
609
  async function runCore() {
608
610
  if (isBlocked()) return 0;
609
611
  patchShowAds();
610
612
 
613
+ const t = now();
614
+ if (t - _lastGc > 30_000) { _lastGc = t; gcDisconnectedWraps(); }
615
+
611
616
  const cfg = await fetchConfig();
612
617
  if (!cfg || cfg.excluded) return 0;
613
618
  initPools(cfg);