nodebb-plugin-ezoic-infinite 1.8.83 → 1.8.85
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 +3 -0
- package/package.json +1 -1
- package/public/client.js +1 -39
package/library.js
CHANGED
|
@@ -159,7 +159,10 @@ const HEAD_PRECONNECTS = [
|
|
|
159
159
|
// Ezoic's TCF cross-frame channel is ready when sa.min.js calls defineScript.
|
|
160
160
|
// Without it the CMP fails to register consent and defineScript throws.
|
|
161
161
|
const EZOIC_SCRIPTS = [
|
|
162
|
+
// __tcfapiLocator must exist before CMP scripts so the TCF cross-frame channel is ready.
|
|
162
163
|
'<script data-cfasync="false">(function(){if(document.getElementById("__tcfapiLocator"))return;var f=document.createElement("iframe");f.style.display="none";f.id=f.name="__tcfapiLocator";(document.head||document.documentElement).appendChild(f);}())</script>',
|
|
164
|
+
// Initialize ezstandalone cmd queue BEFORE sa.min.js (required by Ezoic).
|
|
165
|
+
'<script data-cfasync="false">window.ezstandalone=window.ezstandalone||{};window.ezstandalone.cmd=window.ezstandalone.cmd||[];</script>',
|
|
163
166
|
'<script data-cfasync="false" src="https://cmp.gatekeeperconsent.com/min.js"></script>',
|
|
164
167
|
'<script data-cfasync="false" src="https://the.gatekeeperconsent.com/cmp.min.js"></script>',
|
|
165
168
|
'<script data-cfasync="false" src="//www.ezojs.com/ezoic/sa.min.js"></script>',
|
package/package.json
CHANGED
package/public/client.js
CHANGED
|
@@ -794,43 +794,6 @@
|
|
|
794
794
|
try { window.__nbbAriaObs.observe(document.body, { attributes: true, attributeFilter: ['aria-hidden'] }); } catch (_) {}
|
|
795
795
|
}
|
|
796
796
|
|
|
797
|
-
// ── Console muting ─────────────────────────────────────────────────────────
|
|
798
|
-
|
|
799
|
-
const MUTED_RE = (() => {
|
|
800
|
-
const esc = s => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
801
|
-
return new RegExp([
|
|
802
|
-
`with id ${PH_PREFIX}`,
|
|
803
|
-
'adsbygoogle.push() error',
|
|
804
|
-
'already been defined',
|
|
805
|
-
'bad response. Status',
|
|
806
|
-
'slotDestroyed',
|
|
807
|
-
'identity bridging',
|
|
808
|
-
'[EzoicAds JS]: Placeholder',
|
|
809
|
-
'No valid placeholders',
|
|
810
|
-
'cannot call refresh',
|
|
811
|
-
'no placeholders are currently defined',
|
|
812
|
-
'Debugger iframe already',
|
|
813
|
-
'Error in custom getTCData',
|
|
814
|
-
'no interstitial API',
|
|
815
|
-
'JS-Enable should only',
|
|
816
|
-
'defineScript failed',
|
|
817
|
-
'failed defineScript',
|
|
818
|
-
].map(esc).join('|'));
|
|
819
|
-
})();
|
|
820
|
-
|
|
821
|
-
function muteConsole() {
|
|
822
|
-
if (window.__nbbEzMuted) return;
|
|
823
|
-
window.__nbbEzMuted = true;
|
|
824
|
-
for (const method of ['log', 'info', 'warn', 'error']) {
|
|
825
|
-
const orig = console[method];
|
|
826
|
-
if (typeof orig !== 'function') continue;
|
|
827
|
-
console[method] = function (...args) {
|
|
828
|
-
if (typeof args[0] === 'string' && MUTED_RE.test(args[0])) return;
|
|
829
|
-
return orig.apply(console, args);
|
|
830
|
-
};
|
|
831
|
-
}
|
|
832
|
-
}
|
|
833
|
-
|
|
834
797
|
// ── Network warmup ─────────────────────────────────────────────────────────
|
|
835
798
|
|
|
836
799
|
let _warmed = false;
|
|
@@ -864,7 +827,7 @@
|
|
|
864
827
|
$(window).on('action:ajaxify.start.nbbEzoic', cleanup);
|
|
865
828
|
$(window).on('action:ajaxify.end.nbbEzoic', () => {
|
|
866
829
|
S.pageKey = pageKey(); S.kind = null; S.blockedUntil = 0;
|
|
867
|
-
|
|
830
|
+
ensureTcfLocator(); protectAriaHidden();
|
|
868
831
|
warmNetwork(); patchShowAds(); getIO(); ensureDomObserver();
|
|
869
832
|
requestBurst();
|
|
870
833
|
});
|
|
@@ -894,7 +857,6 @@
|
|
|
894
857
|
// ── Boot ───────────────────────────────────────────────────────────────────
|
|
895
858
|
|
|
896
859
|
S.pageKey = pageKey();
|
|
897
|
-
muteConsole();
|
|
898
860
|
ensureTcfLocator();
|
|
899
861
|
protectAriaHidden();
|
|
900
862
|
warmNetwork();
|