nodebb-plugin-ezoic-infinite 1.4.27 → 1.4.28
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 +10 -5
package/package.json
CHANGED
package/public/client.js
CHANGED
|
@@ -559,9 +559,11 @@
|
|
|
559
559
|
}
|
|
560
560
|
|
|
561
561
|
async function runCore() {
|
|
562
|
+
console.log('[EZOIC DEBUG] runCore démarré, pageKey:', state.pageKey);
|
|
562
563
|
patchShowAds();
|
|
563
564
|
|
|
564
565
|
const cfg = await fetchConfig();
|
|
566
|
+
console.log('[EZOIC DEBUG] Config récupérée, excluded:', cfg?.excluded);
|
|
565
567
|
if (!cfg || cfg.excluded) return;
|
|
566
568
|
|
|
567
569
|
initPools(cfg);
|
|
@@ -595,6 +597,8 @@
|
|
|
595
597
|
}
|
|
596
598
|
}
|
|
597
599
|
|
|
600
|
+
console.log('[EZOIC DEBUG] Inserted:', inserted, 'wrappers');
|
|
601
|
+
|
|
598
602
|
enforceNoAdjacentAds();
|
|
599
603
|
|
|
600
604
|
// If nothing inserted and list isn't in DOM yet (first click), retry a bit
|
|
@@ -645,11 +649,13 @@
|
|
|
645
649
|
$(window).on('action:ajaxify.start.ezoicInfinite', () => cleanup());
|
|
646
650
|
|
|
647
651
|
$(window).on('action:ajaxify.end.ezoicInfinite', () => {
|
|
652
|
+
console.log('[EZOIC DEBUG] ajaxify.end déclenché');
|
|
648
653
|
state.pageKey = getPageKey();
|
|
649
654
|
ensureObserver();
|
|
650
655
|
|
|
651
656
|
// Attendre que le DOM soit construit par NodeBB
|
|
652
657
|
setTimeout(() => {
|
|
658
|
+
console.log('[EZOIC DEBUG] Appel waitForEzoicThenRun après 500ms');
|
|
653
659
|
// Puis attendre que Ezoic soit prêt (comme au chargement initial)
|
|
654
660
|
waitForEzoicThenRun();
|
|
655
661
|
}, 500);
|
|
@@ -705,13 +711,11 @@
|
|
|
705
711
|
|
|
706
712
|
(function check() {
|
|
707
713
|
attempts++;
|
|
714
|
+
console.log('[EZOIC DEBUG] waitForEzoic attempt', attempts, 'ezstandalone:', !!window.ezstandalone, 'showAds:', typeof window.ezstandalone?.showAds);
|
|
715
|
+
|
|
708
716
|
// Vérifier si Ezoic est chargé
|
|
709
717
|
if (window.ezstandalone && typeof window.ezstandalone.showAds === 'function') {
|
|
710
|
-
|
|
711
|
-
try {
|
|
712
|
-
if (window.ezstandalone.placeholders) {
|
|
713
|
-
}
|
|
714
|
-
} catch (e) {}
|
|
718
|
+
console.log('[EZOIC DEBUG] Ezoic prêt après', attempts, 'tentatives');
|
|
715
719
|
// Ezoic est prêt → lancer l'insertion
|
|
716
720
|
scheduleRun();
|
|
717
721
|
setTimeout(scheduleRun, 300);
|
|
@@ -719,6 +723,7 @@
|
|
|
719
723
|
}
|
|
720
724
|
// Ezoic pas encore prêt
|
|
721
725
|
if (attempts >= maxAttempts) {
|
|
726
|
+
console.warn('[EZOIC DEBUG] Timeout après 10s - Ezoic pas chargé');
|
|
722
727
|
// Tenter quand même
|
|
723
728
|
scheduleRun();
|
|
724
729
|
return;
|