nodebb-plugin-ezoic-infinite 1.5.21 → 1.5.22

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/public/client.js +9 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-ezoic-infinite",
3
- "version": "1.5.21",
3
+ "version": "1.5.22",
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
@@ -174,13 +174,14 @@
174
174
  } catch (e) {}
175
175
  };
176
176
 
177
- try {
178
- window.ezstandalone = window.ezstandalone || {};
179
- window.ezstandalone.cmd = window.ezstandalone.cmd || [];
180
- if (window.ezstandalone && typeof window.ezstandalone.destroyPlaceholders === 'function') call();
181
- else window.ezstandalone.cmd.push(call);
182
- } catch (e) {}
183
- }
177
+ try {
178
+ // Do NOT initialize ezstandalone here; if you load Ezoic elsewhere, it will manage its own queue.
179
+ if (window.ezstandalone && typeof window.ezstandalone.destroyPlaceholders === 'function') {
180
+ call();
181
+ } else if (window.ezstandalone && window.ezstandalone.cmd && Array.isArray(window.ezstandalone.cmd)) {
182
+ window.ezstandalone.cmd.push(call);
183
+ }
184
+ } catch (e) {}}
184
185
 
185
186
  function getRecyclable(liveArr) {
186
187
  var margin = 600; // px above viewport
@@ -268,12 +269,7 @@
268
269
  }
269
270
 
270
271
  function patchShowAds() {
271
- // Some Ezoic setups require calling showAds via ezstandalone.cmd.
272
- // We keep existing behavior but make it resilient.
273
- try {
274
- window.ezstandalone = window.ezstandalone || {};
275
- window.ezstandalone.cmd = window.ezstandalone.cmd || [];
276
- } catch (e) {}
272
+ // Intentionally left blank: ezstandalone is managed elsewhere.
277
273
  }
278
274
 
279
275
  function markFilled(id) {