nodebb-plugin-ezoic-infinite 1.4.6 → 1.4.7
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 -3
package/package.json
CHANGED
package/public/client.js
CHANGED
|
@@ -328,10 +328,14 @@
|
|
|
328
328
|
const attempts = (state.retryById.get(id) || 0);
|
|
329
329
|
const phNow = document.getElementById(`${PLACEHOLDER_PREFIX}${id}`);
|
|
330
330
|
const wrapNow = phNow && phNow.parentElement;
|
|
331
|
+
// If Ezoic already defined this id earlier but the placeholder is empty now, we must destroy+reset before re-showAds.
|
|
332
|
+
if (wrapNow && wrapNow.isConnected && state.definedIds && state.definedIds.has(id) && !isPlaceholderFilled(id)) {
|
|
333
|
+
destroyPlaceholderIds([id]);
|
|
334
|
+
resetPlaceholderInWrap(wrapNow, id);
|
|
335
|
+
}
|
|
336
|
+
// If this id was previously attempted and still empty, force a full reset before re-requesting.
|
|
331
337
|
if (attempts > 0 && wrapNow && wrapNow.isConnected && !isPlaceholderFilled(id)) {
|
|
332
|
-
|
|
333
|
-
destroyPlaceholderIds([id]);
|
|
334
|
-
}
|
|
338
|
+
destroyPlaceholderIds([id]);
|
|
335
339
|
resetPlaceholderInWrap(wrapNow, id);
|
|
336
340
|
}
|
|
337
341
|
callShowAdsWhenReady(id);
|