nodebb-plugin-ezoic-infinite 1.5.45 → 1.5.46

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 +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-ezoic-infinite",
3
- "version": "1.5.45",
3
+ "version": "1.5.46",
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
@@ -266,7 +266,7 @@ function mutationHasRelevantAddedNodes(mutations) {
266
266
  const orig = ez.showAds;
267
267
 
268
268
  ez.showAds = function (...args) {
269
- if (isBlocked()) return;
269
+ if (isBlocked()) { try { clearTimeout(hardTimer); } catch (e) {} release(); return; }
270
270
 
271
271
  let ids = [];
272
272
  if (args.length === 1 && Array.isArray(args[0])) ids = args[0];
@@ -788,11 +788,11 @@ function startShow(id) {
788
788
 
789
789
  const domId = `${PLACEHOLDER_PREFIX}${id}`;
790
790
  const ph = document.getElementById(domId);
791
- if (!ph || !ph.isConnected) return;
791
+ if (!ph || !ph.isConnected) { try { clearTimeout(hardTimer); } catch (e) {} release(); return; }
792
792
 
793
793
  const now2 = Date.now();
794
794
  const last2 = state.lastShowById.get(id) || 0;
795
- if (now2 - last2 < 900) return;
795
+ if (now2 - last2 < 900) { try { clearTimeout(hardTimer); } catch (e) {} release(); return; }
796
796
  state.lastShowById.set(id, now2);
797
797
 
798
798
  window.ezstandalone = window.ezstandalone || {};