Skip to content

Commit a3c449f

Browse files
Onetag Bid Adapter: remove unused fields sLeft and sTop (#14302)
* Remove unused properties sLeft and sTop from page info and response validation * Update adapter version --------- Co-authored-by: Diego Tomba <[email protected]>
1 parent 60baec6 commit a3c449f

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

modules/onetagBidAdapter.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@ export function isValid(type, bid) {
8282
return false;
8383
}
8484

85-
const isValidEventTracker = function(et) {
85+
const isValidEventTracker = function (et) {
8686
if (!et.event || !et.methods || !Number.isInteger(et.event) || !Array.isArray(et.methods) || !et.methods.length > 0) {
8787
return false;
8888
}
8989
return true;
9090
}
9191

92-
const isValidAsset = function(asset) {
92+
const isValidAsset = function (asset) {
9393
if (!asset.hasOwnProperty("id") || !Number.isInteger(asset.id)) return false;
9494
const hasValidContent = asset.title || asset.img || asset.data || asset.video;
9595
if (!hasValidContent) return false;
@@ -210,7 +210,8 @@ function interpretResponse(serverResponse, bidderRequest) {
210210
const fledgeAuctionConfigs = body.fledgeAuctionConfigs
211211
return {
212212
bids,
213-
paapi: fledgeAuctionConfigs}
213+
paapi: fledgeAuctionConfigs
214+
}
214215
} else {
215216
return bids;
216217
}
@@ -289,8 +290,6 @@ function getPageInfo(bidderRequest) {
289290
wHeight: winDimensions.innerHeight,
290291
sWidth: winDimensions.screen.width,
291292
sHeight: winDimensions.screen.height,
292-
sLeft: null,
293-
sTop: null,
294293
xOffset: topmostFrame.pageXOffset,
295294
yOffset: topmostFrame.pageYOffset,
296295
docHidden: getDocumentVisibility(topmostFrame),
@@ -299,7 +298,7 @@ function getPageInfo(bidderRequest) {
299298
timing: getTiming(),
300299
version: {
301300
prebid: '$prebid.version$',
302-
adapter: '1.1.5'
301+
adapter: '1.1.6'
303302
}
304303
};
305304
}
@@ -483,7 +482,7 @@ function getBidFloor(bidRequest, mediaType, sizes) {
483482

484483
return {
485484
...floorData,
486-
size: size && size.length === 2 ? {width: size[0], height: size[1]} : null,
485+
size: size && size.length === 2 ? { width: size[0], height: size[1] } : null,
487486
floor: floorData.floor != null ? floorData.floor : null
488487
};
489488
};

test/spec/modules/onetagBidAdapter_spec.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ describe('onetag', function () {
491491
});
492492
it('Should contain all keys', function () {
493493
expect(data).to.be.an('object');
494-
expect(data).to.include.all.keys('location', 'referrer', 'stack', 'numIframes', 'sHeight', 'sWidth', 'docHeight', 'wHeight', 'wWidth', 'sLeft', 'sTop', 'hLength', 'bids', 'docHidden', 'xOffset', 'yOffset', 'networkConnectionType', 'networkEffectiveConnectionType', 'timing', 'version', 'fledgeEnabled');
494+
expect(data).to.include.all.keys('location', 'referrer', 'stack', 'numIframes', 'sHeight', 'sWidth', 'docHeight', 'wHeight', 'wWidth', 'hLength', 'bids', 'docHidden', 'xOffset', 'yOffset', 'networkConnectionType', 'networkEffectiveConnectionType', 'timing', 'version', 'fledgeEnabled');
495495
expect(data.location).to.satisfy(function (value) {
496496
return value === null || typeof value === 'string';
497497
});
@@ -1131,8 +1131,6 @@ function getBannerVideoRequest() {
11311131
wHeight: 949,
11321132
sWidth: 1920,
11331133
sHeight: 1080,
1134-
sLeft: null,
1135-
sTop: null,
11361134
xOffset: 0,
11371135
yOffset: 0,
11381136
docHidden: false,

0 commit comments

Comments
 (0)