doubleverify.js (809B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 "use strict"; 6 7 /** 8 * Bug 1771557 - Shim DoubleVerify analytics 9 * 10 * Some sites such as Sports Illustrated expect DoubleVerify's 11 * analytics script to load, otherwise odd breakage may occur. 12 * This shim helps mitigate such breakage. 13 */ 14 15 if (!window?.PQ?.loaded) { 16 const cmd = []; 17 cmd.push = function (c) { 18 try { 19 c?.(); 20 } catch (_) {} 21 }; 22 23 window.apntag = { 24 anq: [], 25 }; 26 27 window.PQ = { 28 cmd, 29 loaded: true, 30 getTargeting: (_, cb) => cb?.([]), 31 init: () => {}, 32 loadSignals: (_, cb) => cb?.(), 33 loadSignalsForSlots: (_, cb) => cb?.(), 34 PTS: {}, 35 }; 36 }