tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

criteo.js (1517B)


      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 1713720 - Shim Criteo
      9 *
     10 * Sites relying on window.Criteo to be loaded can experience
     11 * breakage if it is blocked. Stubbing out the API in a shim can
     12 * mitigate this breakage.
     13 */
     14 
     15 if (window.Criteo?.CallRTA === undefined) {
     16  window.Criteo = {
     17    CallRTA() {},
     18    ComputeStandaloneDFPTargeting() {},
     19    DisplayAcceptableAdIfAdblocked() {},
     20    DisplayAd() {},
     21    GetBids() {},
     22    GetBidsForAdUnit() {},
     23    Passback: {
     24      RequestBids() {},
     25      RenderAd() {},
     26    },
     27    PubTag: {
     28      Adapters: {
     29        AMP() {},
     30        Prebid() {},
     31      },
     32      Context: {
     33        GetIdfs() {},
     34        SetIdfs() {},
     35      },
     36      DirectBidding: {
     37        DirectBiddingEvent() {},
     38        DirectBiddingSlot() {},
     39        DirectBiddingUrlBuilder() {},
     40        Size() {},
     41      },
     42      RTA: {
     43        DefaultCrtgContentName: "crtg_content",
     44        DefaultCrtgRtaCookieName: "crtg_rta",
     45      },
     46    },
     47    RenderAd() {},
     48    RequestBids() {},
     49    RequestBidsOnGoogleTagSlots() {},
     50    SetCCPAExplicitOptOut() {},
     51    SetCeh() {},
     52    SetDFPKeyValueTargeting() {},
     53    SetLineItemRanges() {},
     54    SetPublisherExt() {},
     55    SetSlotsExt() {},
     56    SetTargeting() {},
     57    SetUserExt() {},
     58    events: {
     59      push() {},
     60    },
     61    passbackEvents: [],
     62    usePrebidEvents: true,
     63  };
     64 }