Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@financial-times/ads-display

Package Overview
Dependencies
Maintainers
0
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@financial-times/ads-display - npm Package Compare versions

Comparing version 6.1.0 to 6.1.1

22

dist/ads-display.js

@@ -536,11 +536,15 @@ import oAds from '@financial-times/ads-legacy-o-ads';

window.googletag.cmd.push(() => {
const gptSlots = window.googletag.pubads().getSlots();
const gptSlots = getSlotData();
const iasPETSlots = gptSlots.map(slot => {
const sizes = slot.getSizes().map(size => {
if (size.getWidth && size.getHeight) return [size.getWidth(), size.getHeight()];else return [1, 1];
const sizes = slot.sizes.map(size => {
if (Array.isArray(size)) {
return [size[0], size[1]];
} else {
return [1, 1];
}
});
return {
adSlotId: slot.getSlotElementId(),
adSlotId: slot.id,
size: sizes,
adUnitPath: slot.getAdUnitPath()
adUnitPath: slot.adUnitPath
};

@@ -554,2 +558,10 @@ });

};
const getSlotData = () => {
const currentBreakpoint = window.oAds.utils.responsive.getCurrent();
return Object.values(window.oAds.slots).filter(slot => slot.gpt && slot.sizes && slot.sizes[currentBreakpoint]).map(slot => ({
id: slot.gpt.id,
sizes: slot.sizes[currentBreakpoint],
adUnitPath: slot.gpt.unitName
}));
};
const validateTrafficIasScript = () => {

@@ -556,0 +568,0 @@ attachIasScript();

@@ -5,3 +5,3 @@ {

"type": "module",
"version": "6.1.0",
"version": "6.1.1",
"typings": "./types.d.ts",

@@ -19,6 +19,6 @@ "files": [

"dependencies": {
"@financial-times/ads-legacy-o-ads": "^6.1.0",
"@financial-times/ads-moat-integration": "^6.1.0",
"@financial-times/ads-permutive": "^6.1.0",
"@financial-times/ads-personalised-consent": "^6.1.0",
"@financial-times/ads-legacy-o-ads": "^6.1.1",
"@financial-times/ads-moat-integration": "^6.1.1",
"@financial-times/ads-permutive": "^6.1.1",
"@financial-times/ads-personalised-consent": "^6.1.1",
"@financial-times/n-tracking": "^4.0.1",

@@ -25,0 +25,0 @@ "@financial-times/o-tracking": "^4.0.0",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc