nodebb-plugin-ezoic-infinite 1.4.64 → 1.4.65

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-ezoic-infinite",
3
- "version": "1.4.64",
3
+ "version": "1.4.65",
4
4
  "description": "Production-ready Ezoic infinite ads integration for NodeBB 4.x",
5
5
  "main": "library.js",
6
6
  "license": "MIT",
package/public/client.js CHANGED
@@ -128,6 +128,24 @@
128
128
  } catch (e) {}
129
129
  }
130
130
 
131
+
132
+ // Nettoyer les wrappers vides (sans pub) pour éviter espaces verticaux
133
+ function cleanupEmptyWrappers() {
134
+ try {
135
+ document.querySelectorAll('.ezoic-ad').forEach(wrapper => {
136
+ const ph = wrapper.querySelector('[id^="ezoic-pub-ad-placeholder-"]');
137
+ if (ph && ph.children.length === 0) {
138
+ // Placeholder vide après 3s = pub non chargée
139
+ setTimeout(() => {
140
+ if (ph.children.length === 0) {
141
+ wrapper.remove();
142
+ }
143
+ }, 3000);
144
+ }
145
+ });
146
+ } catch (e) {}
147
+ }
148
+
131
149
  function getRecyclable(liveArr) {
132
150
  const margin = 600;
133
151
  for (let i = 0; i < liveArr.length; i++) {
package/public/style.css CHANGED
@@ -1,3 +1,3 @@
1
- .ezoic-ad{height:auto !important; min-height:0 !important; padding:0 !important; margin:0.5rem 0;}
1
+ .ezoic-ad{height:auto !important; padding:0 !important; margin: 0.25rem 0;}
2
2
  .ezoic-ad .ezoic-ad-inner{padding:0;margin:0;}
3
3
  .ezoic-ad .ezoic-ad-inner > div{padding:0;margin:0;}