nodebb-plugin-ezoic-infinite 1.4.85 → 1.4.87
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 +8 -14
- package/public/style.css +28 -3
package/package.json
CHANGED
package/public/client.js
CHANGED
|
@@ -12,8 +12,6 @@
|
|
|
12
12
|
let EZOIC_BLOCKED = false;
|
|
13
13
|
|
|
14
14
|
// DEBUG: Vérifier que le plugin charge
|
|
15
|
-
console.log('[NODEBB-EZOIC] Plugin chargé et initialisé');
|
|
16
|
-
console.log('[NODEBB-EZOIC] EZOIC_BLOCKED initial:', EZOIC_BLOCKED);
|
|
17
15
|
|
|
18
16
|
const sessionDefinedIds = new Set();
|
|
19
17
|
|
|
@@ -287,15 +285,11 @@
|
|
|
287
285
|
if (typeof ez.showAds !== 'function') return;
|
|
288
286
|
|
|
289
287
|
window.__nodebbEzoicPatched = true;
|
|
290
|
-
console.log('[NODEBB-EZOIC] Patch Ezoic appliqué !');
|
|
291
288
|
const orig = ez.showAds;
|
|
292
289
|
|
|
293
290
|
ez.showAds = function (arg) {
|
|
294
|
-
console.log('[NODEBB-EZOIC] showAds() appelé, arg:', arg, 'BLOCKED:', EZOIC_BLOCKED);
|
|
295
|
-
|
|
296
291
|
// CRITIQUE: Bloquer TOUS appels si navigation en cours
|
|
297
292
|
if (EZOIC_BLOCKED) {
|
|
298
|
-
console.log('[NODEBB-EZOIC] showAds() BLOQUÉ par flag');
|
|
299
293
|
return; // Ignorer complètement
|
|
300
294
|
}
|
|
301
295
|
|
|
@@ -441,7 +435,6 @@
|
|
|
441
435
|
// Appeler showAds avec TOUS les IDs en une fois
|
|
442
436
|
try {
|
|
443
437
|
// CRITIQUE: Re-patcher AVANT chaque appel pour être sûr
|
|
444
|
-
console.log('[NODEBB-EZOIC] Re-patch avant showAds');
|
|
445
438
|
patchShowAds();
|
|
446
439
|
|
|
447
440
|
window.ezstandalone = window.ezstandalone || {};
|
|
@@ -639,11 +632,8 @@
|
|
|
639
632
|
|
|
640
633
|
function cleanup() {
|
|
641
634
|
// DEBUG: Vérifier que cleanup est appelé
|
|
642
|
-
console.log('[NODEBB-EZOIC] cleanup() appelé');
|
|
643
|
-
|
|
644
635
|
// CRITIQUE: BLOQUER Ezoic immédiatement
|
|
645
636
|
EZOIC_BLOCKED = true;
|
|
646
|
-
console.log('[NODEBB-EZOIC] EZOIC_BLOCKED = true');
|
|
647
637
|
|
|
648
638
|
// Détruire TOUS les placeholders Ezoic AVANT de supprimer DOM
|
|
649
639
|
const allWrappers = document.querySelectorAll('.ezoic-ad');
|
|
@@ -658,7 +648,6 @@
|
|
|
658
648
|
|
|
659
649
|
// CRITIQUE: Vider COMPLÈTEMENT sessionDefinedIds
|
|
660
650
|
// Pour éviter que d'anciens IDs soient encore en mémoire
|
|
661
|
-
console.log('[NODEBB-EZOIC] Suppression IDs du DOM:', allIds);
|
|
662
651
|
|
|
663
652
|
// CRITIQUE: Détruire AUSSI tous les IDs tracés dans state
|
|
664
653
|
// Pour annuler les anciens IDs qu'Ezoic a en mémoire
|
|
@@ -669,8 +658,6 @@
|
|
|
669
658
|
];
|
|
670
659
|
|
|
671
660
|
const allIdsToDestroy = [...new Set([...allIds, ...trackedIds, ...Array.from(sessionDefinedIds)])];
|
|
672
|
-
console.log('[NODEBB-EZOIC] Destroy TOUS les IDs tracés:', allIdsToDestroy);
|
|
673
|
-
console.log('[NODEBB-EZOIC] Vidage COMPLET de sessionDefinedIds');
|
|
674
661
|
sessionDefinedIds.clear(); // ✅ VIDER TOUT
|
|
675
662
|
|
|
676
663
|
if (allIdsToDestroy.length > 0) {
|
|
@@ -721,6 +708,11 @@
|
|
|
721
708
|
}
|
|
722
709
|
|
|
723
710
|
async function runCore() {
|
|
711
|
+
// CRITIQUE: Ne rien insérer si navigation en cours
|
|
712
|
+
if (EZOIC_BLOCKED) {
|
|
713
|
+
return;
|
|
714
|
+
}
|
|
715
|
+
|
|
724
716
|
if (!state.canShowAds) {
|
|
725
717
|
return;
|
|
726
718
|
}
|
|
@@ -810,12 +802,14 @@
|
|
|
810
802
|
state.pageKey = getPageKey();
|
|
811
803
|
|
|
812
804
|
// Débloquer Ezoic IMMÉDIATEMENT pour la nouvelle page
|
|
813
|
-
console.log('[NODEBB-EZOIC] ajaxify.end - Déblocage Ezoic');
|
|
814
805
|
EZOIC_BLOCKED = false;
|
|
815
806
|
|
|
816
807
|
ensureObserver();
|
|
817
808
|
|
|
818
809
|
state.canShowAds = true;
|
|
810
|
+
|
|
811
|
+
// CRITIQUE: Relancer insertion maintenant que navigation est terminée
|
|
812
|
+
scheduleRun();
|
|
819
813
|
});
|
|
820
814
|
|
|
821
815
|
$(window).on('action:category.loaded.ezoicInfinite', () => {
|
package/public/style.css
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
border: 0 !important;
|
|
6
6
|
overflow: hidden !important;
|
|
7
7
|
line-height: 0 !important;
|
|
8
|
+
font-size: 0 !important;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
.ezoic-ad * {
|
|
@@ -13,9 +14,33 @@
|
|
|
13
14
|
border: 0 !important;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
display: block;
|
|
17
|
+
/* Force enfants directs collés */
|
|
18
|
+
.ezoic-ad > * {
|
|
19
|
+
display: block !important;
|
|
20
|
+
margin: 0 !important;
|
|
21
|
+
padding: 0 !important;
|
|
22
|
+
line-height: 0 !important;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Supprimer espace après */
|
|
26
|
+
.ezoic-ad::after,
|
|
27
|
+
.ezoic-ad > *::after {
|
|
28
|
+
content: '' !important;
|
|
29
|
+
display: block !important;
|
|
19
30
|
height: 0 !important;
|
|
20
31
|
margin: 0 !important;
|
|
32
|
+
padding: 0 !important;
|
|
33
|
+
line-height: 0 !important;
|
|
34
|
+
font-size: 0 !important;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Cacher divs vides qui créent espace */
|
|
38
|
+
.ezoic-ad > div:empty {
|
|
39
|
+
display: none !important;
|
|
40
|
+
height: 0 !important;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ezoic-ad > *:empty:not(iframe):not(img):not(ins) {
|
|
44
|
+
display: none !important;
|
|
45
|
+
height: 0 !important;
|
|
21
46
|
}
|