nodebb-plugin-ezoic-infinite 1.4.35 → 1.4.37
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 -8
package/package.json
CHANGED
package/public/client.js
CHANGED
|
@@ -325,6 +325,10 @@
|
|
|
325
325
|
|
|
326
326
|
function callShowAdsWhenReady(id) {
|
|
327
327
|
if (!id) return;
|
|
328
|
+
|
|
329
|
+
if (window.location.pathname !== '/') {
|
|
330
|
+
console.log('[TIMING] callShowAdsWhenReady ID:', id);
|
|
331
|
+
}
|
|
328
332
|
|
|
329
333
|
const now = Date.now(), last = state.lastShowById.get(id) || 0;
|
|
330
334
|
if (now - last < 3500) return;
|
|
@@ -351,6 +355,9 @@
|
|
|
351
355
|
attempts += 1;
|
|
352
356
|
const el = document.getElementById(phId);
|
|
353
357
|
if (el && el.isConnected) {
|
|
358
|
+
if (window.location.pathname !== '/') {
|
|
359
|
+
console.log('[TIMING] Placeholder', id, 'trouvé dans DOM, appel showAds');
|
|
360
|
+
}
|
|
354
361
|
// Si doCall() réussit, Ezoic est chargé et showAds a été appelé → sortir
|
|
355
362
|
if (doCall()) {
|
|
356
363
|
state.pendingById.delete(id); // nettoyage au cas où
|
|
@@ -588,14 +595,6 @@
|
|
|
588
595
|
|
|
589
596
|
enforceNoAdjacentAds();
|
|
590
597
|
|
|
591
|
-
// Si on a inséré des placeholders, notifier Ezoic (optionnel)
|
|
592
|
-
if (inserted > 0) {
|
|
593
|
-
try {
|
|
594
|
-
if (window.ezstandalone && typeof window.ezstandalone.refresh === 'function') {
|
|
595
|
-
window.ezstandalone.refresh();
|
|
596
|
-
}
|
|
597
|
-
} catch (e) {}
|
|
598
|
-
}
|
|
599
598
|
|
|
600
599
|
// If nothing inserted and list isn't in DOM yet (first click), retry a bit
|
|
601
600
|
let count = 0;
|