nodebb-plugin-ezoic-infinite 1.4.56 → 1.4.57

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 +2 -2
  2. package/public/client.js +4 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-ezoic-infinite",
3
- "version": "1.4.56",
3
+ "version": "1.4.57",
4
4
  "description": "Production-ready Ezoic infinite ads integration for NodeBB 4.x",
5
5
  "main": "library.js",
6
6
  "license": "MIT",
@@ -18,4 +18,4 @@
18
18
  "compatibility": "^4.0.0"
19
19
  },
20
20
  "private": false
21
- }
21
+ }
package/public/client.js CHANGED
@@ -450,8 +450,7 @@
450
450
  var wrap = null;
451
451
 
452
452
  if (pick.recycled && pick.recycled.wrap) {
453
- // Recycle: only destroy if Ezoic has actually defined this placeholder before.
454
- if (sessionDefinedIds.has(id)) destroyPlaceholderIds([id]);
453
+ // Recycle: do not call ezstandalone.destroyPlaceholders() (can break ajaxify flows).
455
454
 
456
455
  // Remove old wrapper.
457
456
  var oldWrap = pick.recycled.wrap;
@@ -503,12 +502,6 @@
503
502
  // Remove adjacent wrapper (do not hide).
504
503
  try {
505
504
  var ph = ad.querySelector('[id^="' + PLACEHOLDER_PREFIX + '"]');
506
- if (ph) {
507
- var id = parseInt(ph.id.replace(PLACEHOLDER_PREFIX, ''), 10);
508
- if (Number.isFinite(id) && id > 0 && sessionDefinedIds.has(id)) {
509
- destroyPlaceholderIds([id]);
510
- }
511
- }
512
505
  ad.remove();
513
506
  } catch (e) {}
514
507
  }
@@ -530,8 +523,9 @@
530
523
  state.obs = null;
531
524
  }
532
525
 
533
- // Destroy placeholders that were used (only those that were actually defined).
534
- destroyUsedPlaceholders();
526
+ // NOTE: Do NOT call ezstandalone.destroyPlaceholders() during ajaxify navigation.
527
+ // In practice this can leave Ezoic in a state where new placeholders stay "unused"
528
+ // until a full page reload. We only remove our wrappers.
535
529
 
536
530
  // Remove wrappers from DOM (safe because insertion is now blocked).
537
531
  try {