nodebb-plugin-ezoic-infinite 0.7.5 → 0.7.6

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 +2 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-ezoic-infinite",
3
- "version": "0.7.5",
3
+ "version": "0.7.6",
4
4
  "description": "Ezoic ads with infinite scroll using a pool of placeholder IDs",
5
5
  "main": "library.js",
6
6
  "license": "MIT",
package/public/client.js CHANGED
@@ -193,11 +193,8 @@ function callEzoic(ids) {
193
193
  window.ezstandalone.cmd = window.ezstandalone.cmd || [];
194
194
 
195
195
  const run = function () {
196
- try {
197
- if (typeof window.ezstandalone.destroyPlaceholders === 'function') {
198
- window.ezstandalone.destroyPlaceholders.apply(window.ezstandalone, ids);
199
- }
200
- } catch (e) {}
196
+ // destroyPlaceholders is only needed when placeholder IDs are reused.
197
+ // This plugin avoids reusing IDs on the same page, so we skip it to prevent Ezoic from removing valid placeholders.
201
198
  try {
202
199
  if (typeof window.ezstandalone.showAds === 'function') {
203
200
  window.ezstandalone.showAds.apply(window.ezstandalone, ids);