nodebb-plugin-ezoic-infinite 1.4.59 → 1.4.60
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 +7 -1
package/package.json
CHANGED
package/public/client.js
CHANGED
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
function destroyPlaceholderIds(ids) {
|
|
163
163
|
if (!ids || !ids.length) return;
|
|
164
164
|
|
|
165
|
-
// Only destroy ids that were actually
|
|
165
|
+
// Only destroy ids that were actually requested/defined at least once to avoid Ezoic warnings.
|
|
166
166
|
var filtered = ids.filter(function (id) {
|
|
167
167
|
try { return sessionDefinedIds.has(id); } catch (e) { return true; }
|
|
168
168
|
});
|
|
@@ -173,6 +173,7 @@
|
|
|
173
173
|
try {
|
|
174
174
|
if (window.ezstandalone && typeof window.ezstandalone.destroyPlaceholders === 'function') {
|
|
175
175
|
window.ezstandalone.destroyPlaceholders(filtered);
|
|
176
|
+
try { filtered.forEach(function(i){ sessionDefinedIds.delete(i); }); } catch (e) {}
|
|
176
177
|
}
|
|
177
178
|
} catch (e) {}
|
|
178
179
|
};
|
|
@@ -279,6 +280,10 @@
|
|
|
279
280
|
} catch (e) {}
|
|
280
281
|
}
|
|
281
282
|
|
|
283
|
+
function markDefined(id) {
|
|
284
|
+
try { sessionDefinedIds.add(id); } catch (e) {}
|
|
285
|
+
}
|
|
286
|
+
|
|
282
287
|
function markFilled(id) {
|
|
283
288
|
try { sessionDefinedIds.add(id); } catch (e) {}
|
|
284
289
|
}
|
|
@@ -382,6 +387,7 @@
|
|
|
382
387
|
try {
|
|
383
388
|
// If placeholder is gone, stop.
|
|
384
389
|
if (!ph || !ph.isConnected) return false;
|
|
390
|
+
markDefined(id);
|
|
385
391
|
scheduleShowAdsBatch([id]);
|
|
386
392
|
return true;
|
|
387
393
|
} catch (e) {}
|