nodebb-plugin-ezoic-infinite 1.8.67 → 1.8.69
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/library.js +4 -6
- package/package.json +1 -1
package/library.js
CHANGED
|
@@ -135,15 +135,14 @@ 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.
|
|
142
138
|
const EZOIC_SCRIPTS = [
|
|
143
139
|
'<script data-cfasync="false" src="https://cmp.gatekeeperconsent.com/min.js"></script>',
|
|
144
140
|
'<script data-cfasync="false" src="https://the.gatekeeperconsent.com/cmp.min.js"></script>',
|
|
141
|
+
'<script>',
|
|
142
|
+
'window.ezstandalone = window.ezstandalone || {};',
|
|
143
|
+
'ezstandalone.cmd = ezstandalone.cmd || [];',
|
|
144
|
+
'</script>',
|
|
145
145
|
'<script async src="//www.ezojs.com/ezoic/sa.min.js"></script>',
|
|
146
|
-
'<script src="//ezoicanalytics.com/analytics.js"></script>',
|
|
147
146
|
].join('\n');
|
|
148
147
|
|
|
149
148
|
// ── Hooks ────────────────────────────────────────────────────────────────────
|
|
@@ -173,7 +172,6 @@ plugin.injectEzoicHead = async (data) => {
|
|
|
173
172
|
// Minimal stub for excluded users — prevents ReferenceError if other
|
|
174
173
|
// scripts reference _ezaq or ezstandalone
|
|
175
174
|
const stub = '<script>'
|
|
176
|
-
+ 'window._ezaq=window._ezaq||{};'
|
|
177
175
|
+ 'window.ezstandalone=window.ezstandalone||{};'
|
|
178
176
|
+ 'window.ezstandalone.cmd=window.ezstandalone.cmd||[];'
|
|
179
177
|
+ '</script>';
|