nodebb-plugin-ezoic-infinite 1.4.87 → 1.4.88
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 +22 -8
package/package.json
CHANGED
package/public/client.js
CHANGED
|
@@ -147,25 +147,39 @@
|
|
|
147
147
|
const ph = wrapper.querySelector('[id^="ezoic-pub-ad-placeholder-"]');
|
|
148
148
|
if (!ph) return;
|
|
149
149
|
|
|
150
|
-
//
|
|
151
|
-
// CRITIQUE: Ne JAMAIS toucher au placeholder ou ses enfants
|
|
150
|
+
// ULTRA-AGRESSIF: Supprimer TOUT sauf placeholder
|
|
152
151
|
Array.from(wrapper.children).forEach(child => {
|
|
153
|
-
|
|
154
|
-
if (child === ph) return;
|
|
155
|
-
if (child.contains(ph)) return;
|
|
152
|
+
if (child === ph || child.contains(ph)) return;
|
|
156
153
|
if (child.id && child.id.startsWith('ezoic-pub-ad-placeholder-')) return;
|
|
157
|
-
|
|
158
|
-
// Supprimer le reste
|
|
159
154
|
child.remove();
|
|
160
155
|
});
|
|
161
156
|
|
|
162
|
-
// Forcer wrapper
|
|
157
|
+
// Forcer wrapper collé
|
|
163
158
|
wrapper.style.height = 'auto';
|
|
164
159
|
wrapper.style.overflow = 'hidden';
|
|
165
160
|
wrapper.style.lineHeight = '0';
|
|
161
|
+
wrapper.style.fontSize = '0';
|
|
162
|
+
wrapper.style.margin = '0';
|
|
163
|
+
wrapper.style.padding = '0';
|
|
164
|
+
|
|
165
|
+
// Nettoyer aussi DANS le placeholder
|
|
166
|
+
if (ph) {
|
|
167
|
+
Array.from(ph.children).forEach(child => {
|
|
168
|
+
// Garder seulement iframe, ins, img
|
|
169
|
+
const tag = child.tagName;
|
|
170
|
+
if (tag !== 'IFRAME' && tag !== 'INS' && tag !== 'IMG' && tag !== 'DIV') {
|
|
171
|
+
child.remove();
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
}
|
|
166
175
|
});
|
|
167
176
|
} catch (e) {}
|
|
168
177
|
}
|
|
178
|
+
|
|
179
|
+
// Lancer cleanup périodique toutes les 2s
|
|
180
|
+
setInterval(() => {
|
|
181
|
+
try { cleanupInvisibleEzoicElements(); } catch (e) {}
|
|
182
|
+
}, 2000);
|
|
169
183
|
|
|
170
184
|
function cleanupEmptyWrappers() {
|
|
171
185
|
try {
|