nodebb-plugin-ezoic-infinite 1.5.92 → 1.5.93

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 +0 -12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-ezoic-infinite",
3
- "version": "1.5.92",
3
+ "version": "1.5.93",
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
@@ -1,17 +1,6 @@
1
1
  (function () {
2
2
  'use strict';
3
3
 
4
- function ezoicTrySetAnchor(wrap, el, kindClass, afterPos) {
5
- try {
6
- if (!wrap || !el) return;
7
- var pid = el.getAttribute && (el.getAttribute('data-pid') || el.getAttribute('data-id'));
8
- var tid = el.getAttribute && (el.getAttribute('data-tid') || el.getAttribute('data-topic-id'));
9
- var key = kindClass + ':' + (pid ? ('pid:' + pid) : (tid ? ('tid:' + tid) : ('pos:' + String(afterPos || 0))));
10
- wrap.setAttribute('data-ezoic-anchor', key);
11
- } catch (e) {}
12
- }
13
-
14
-
15
4
  // Track scroll direction to avoid aggressive recycling when the user scrolls upward.
16
5
  // Recycling while scrolling up is a common cause of ads "bunching" and a "disappearing too fast" feeling.
17
6
  let lastScrollY = 0;
@@ -651,7 +640,6 @@ function globalGapFixInit() {
651
640
  const wrap = document.createElement('div');
652
641
  wrap.className = `${WRAP_CLASS} ${kindClass}`;
653
642
  wrap.setAttribute('data-ezoic-after', String(afterPos));
654
- ezoicTrySetAnchor(wrap, el, kindClass, afterPos);
655
643
  wrap.setAttribute('data-ezoic-wrapid', String(id));
656
644
  wrap.setAttribute('data-created', String(now()));
657
645
  // "Pinned" placements (after the first item) should remain stable.