diff --git a/modules/improvedigitalBidAdapter.js b/modules/improvedigitalBidAdapter.js index 33ba08e8fd2..a0347382dd1 100644 --- a/modules/improvedigitalBidAdapter.js +++ b/modules/improvedigitalBidAdapter.js @@ -6,14 +6,6 @@ import {Renderer} from '../src/Renderer.js'; import {hasPurpose1Consent} from '../src/utils/gdpr.js'; import {ortbConverter} from '../libraries/ortbConverter/converter.js'; import {convertCurrency} from '../libraries/currencyUtils/currency.js'; -/** - * See https://github.com/prebid/Prebid.js/pull/8827 for details on linting exception - * ImproveDigital only imports after winning a bid and only if the creative cannot reach top - * Also see https://github.com/prebid/Prebid.js/issues/11656 - */ -// eslint-disable-next-line no-restricted-imports -import {loadExternalScript} from '../src/adloader.js'; -import { MODULE_TYPE_BIDDER } from '../src/activities/modules.js'; /** * @typedef {import('../src/adapters/bidderFactory.js').BidRequest} BidRequest @@ -225,7 +217,6 @@ export const CONVERTER = ortbConverter({ renderer: ID_OUTSTREAM.createRenderer(bidRequest) }) } - ID_RAZR.forwardBid({bidRequest, bid: bidResponse}); return bidResponse; }, overrides: { @@ -367,61 +358,3 @@ const ID_OUTSTREAM = { bid.renderer.handleVideoEvent({ id, eventName }); }, }; - -const ID_RAZR = { - RENDERER_URL: 'https://cdn.360yield.com/razr/tag.js', - - forwardBid({bidRequest, bid}) { - if (bid.mediaType !== BANNER) { - return; - } - - const cfg = { - prebid: { - bidRequest, - bid - } - }; - - const cfgStr = JSON.stringify(cfg).replace(/<\/script>/ig, '\\x3C/script>'); - const s = ``; - // prepend RAZR config to ad markup: - bid.ad = s + bid.ad; - - this.installListener(); - }, - - installListener() { - if (this._listenerInstalled) { - return; - } - - window.addEventListener('message', function(e) { - const data = e.data?.razr?.load; - if (!data) { - return; - } - - if (e.source) { - data.source = e.source; - if (data.id) { - e.source.postMessage({ - razr: { - id: data.id - } - }, '*'); - } - } - - const ns = window.razr = window.razr || {}; - ns.q = ns.q || []; - ns.q.push(data); - - if (!ns.loaded) { - loadExternalScript(ID_RAZR.RENDERER_URL, MODULE_TYPE_BIDDER, BIDDER_CODE); - } - }); - - this._listenerInstalled = true; - } -}; diff --git a/src/adloader.js b/src/adloader.js index bf695dd627b..8fad053f7f5 100644 --- a/src/adloader.js +++ b/src/adloader.js @@ -11,7 +11,6 @@ const _approvedLoadExternalJSList = [ 'debugging', 'outstream', // Bid Modules - only exception is on rendering edge cases, to clean up in Prebid 10: - 'improvedigital', 'showheroes-bs', // RTD modules: 'aaxBlockmeter', diff --git a/test/spec/modules/improvedigitalBidAdapter_spec.js b/test/spec/modules/improvedigitalBidAdapter_spec.js index 46e07bacbe4..f6266503297 100644 --- a/test/spec/modules/improvedigitalBidAdapter_spec.js +++ b/test/spec/modules/improvedigitalBidAdapter_spec.js @@ -1006,7 +1006,7 @@ describe('Improve Digital Adapter Tests', function () { width: 728, height: 90, ttl: 300, - ad: '\x3Cscript>window.__razr_config = {"prebid":{"bidRequest":{"bidder":"improvedigital","params":{"publisherId":1234,"placementId":1053688,"keyValues":{"testKey":["testValue"]},"size":{"w":800,"h":600}},"adUnitCode":"div-gpt-ad-1499748733608-0","transactionId":"f183e871-fbed-45f0-a427-c8a63c4c01eb","bidId":"33e9500b21129f","bidderRequestId":"2772c1e566670b","auctionId":"192721e36a0239","mediaTypes":{"banner":{"sizes":[[300,250],[160,600]]}},"sizes":[[300,250],[160,600]]},"bid":{"mediaType":"banner","ad":"