nodebb-plugin-ezoic-infinite 1.7.61 → 1.7.63
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 +11 -10
package/package.json
CHANGED
package/public/client.js
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
const A_ANCHOR = 'data-ezoic-anchor'; // "kindClass:stableId"
|
|
41
41
|
const A_WRAPID = 'data-ezoic-wrapid'; // id Ezoic
|
|
42
42
|
|
|
43
|
-
const EMPTY_CHECK_MS =
|
|
43
|
+
const EMPTY_CHECK_MS = 5_000; // 5s après showAds — séquence define+display+show prend ~1.4s
|
|
44
44
|
const MAX_INSERTS_RUN = 6; // insertions max par appel runCore
|
|
45
45
|
const MAX_INFLIGHT = 4; // showAds() simultanés max
|
|
46
46
|
const SHOW_THROTTLE_MS = 900; // anti-spam showAds() par id
|
|
@@ -138,6 +138,14 @@
|
|
|
138
138
|
S.pools.posts = parseIds(cfg.messagePlaceholderIds);
|
|
139
139
|
S.pools.categories = parseIds(cfg.categoryPlaceholderIds);
|
|
140
140
|
S.poolsReady = true;
|
|
141
|
+
// Déclarer tous les ids du pool une seule fois — Ezoic les enregistre en interne
|
|
142
|
+
const allIds = [...S.pools.topics, ...S.pools.posts, ...S.pools.categories];
|
|
143
|
+
if (allIds.length) {
|
|
144
|
+
window.ezstandalone = window.ezstandalone || {};
|
|
145
|
+
const ez = window.ezstandalone;
|
|
146
|
+
const doDef = () => { try { ez.define(allIds); } catch (_) {} };
|
|
147
|
+
typeof ez.cmd?.push === 'function' ? ez.cmd.push(doDef) : doDef();
|
|
148
|
+
}
|
|
141
149
|
}
|
|
142
150
|
|
|
143
151
|
// ── Page identity ──────────────────────────────────────────────────────────
|
|
@@ -403,15 +411,8 @@
|
|
|
403
411
|
window.ezstandalone = window.ezstandalone || {};
|
|
404
412
|
const ez = window.ezstandalone;
|
|
405
413
|
const doShow = () => {
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
setTimeout(() => {
|
|
409
|
-
try { ez.displayMore([id]); } catch (_) {}
|
|
410
|
-
setTimeout(() => {
|
|
411
|
-
try { ez.showAds(id); } catch (_) {}
|
|
412
|
-
setTimeout(() => { clearTimeout(timer); release(); }, 700);
|
|
413
|
-
}, 200);
|
|
414
|
-
}, 200);
|
|
414
|
+
try { ez.showAds(id); } catch (_) {}
|
|
415
|
+
setTimeout(() => { clearTimeout(timer); release(); }, 700);
|
|
415
416
|
};
|
|
416
417
|
Array.isArray(ez.cmd) ? ez.cmd.push(doShow) : doShow();
|
|
417
418
|
} catch (_) { clearTimeout(timer); release(); }
|