nodebb-plugin-ezoic-infinite 1.8.72 → 1.8.74

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/library.js +6 -7
  2. package/package.json +1 -1
package/library.js CHANGED
@@ -135,14 +135,15 @@ const HEAD_PRECONNECTS = [
135
135
  '<link rel="dns-prefetch" href="https://securepubads.g.doubleclick.net">',
136
136
  ].join('\n');
137
137
 
138
- // Match v50 exactly: CMP → sa.min.js, no stubs.
139
- // sa.min.js defines _ezaq and ezstandalone itself.
140
- // Placing stubs before or alongside sa.min.js changes Ezoic's init path
141
- // and causes "Timed out waiting for loadingStatus" errors.
138
+ // Working config: sa.min.js loaded synchronously (no async).
139
+ // async on sa.min.js caused "Timed out waiting for loadingStatus LOADING"
140
+ // because it could execute before CMP was ready.
141
+ // analytics.js provides Ezoic analytics integration.
142
142
  const EZOIC_SCRIPTS = [
143
143
  '<script data-cfasync="false" src="https://cmp.gatekeeperconsent.com/min.js"></script>',
144
144
  '<script data-cfasync="false" src="https://the.gatekeeperconsent.com/cmp.min.js"></script>',
145
- '<script async src="//www.ezojs.com/ezoic/sa.min.js"></script>',
145
+ '<script src="//www.ezojs.com/ezoic/sa.min.js"></script>',
146
+ '<script src="//ezoicanalytics.com/analytics.js"></script>',
146
147
  ].join('\n');
147
148
 
148
149
  // ── Hooks ────────────────────────────────────────────────────────────────────
@@ -169,8 +170,6 @@ plugin.injectEzoicHead = async (data) => {
169
170
 
170
171
  if (excluded) {
171
172
  const cfg = buildClientConfig(settings, true);
172
- // Minimal stub for excluded users — prevents ReferenceError if other
173
- // scripts reference _ezaq or ezstandalone
174
173
  const stub = '<script data-cfasync="false">'
175
174
  + 'window._ezaq=window._ezaq||{};'
176
175
  + 'window.ezstandalone=window.ezstandalone||{};'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-ezoic-infinite",
3
- "version": "1.8.72",
3
+ "version": "1.8.74",
4
4
  "description": "Production-ready Ezoic infinite ads integration for NodeBB 4.x",
5
5
  "main": "library.js",
6
6
  "license": "MIT",