@@ -7,56 +7,56 @@ var utils = require('../utils.js');
7
7
var OpenxAdapter = function OpenxAdapter ( options ) {
8
8
const BIDDER_CODE = 'openx_neo' ;
9
9
var startTime ;
10
-
10
+
11
11
let pdNode = null ;
12
12
13
13
$$PREBID_GLOBAL$$ . oxARJResponse = function ( oxResponseObj ) {
14
14
let adUnits = oxResponseObj . ads . ad ;
15
- if ( oxResponseObj . ads && oxResponseObj . ads . pixels ) {
16
- makePDCall ( oxResponseObj . ads . pixels ) ;
17
- }
15
+ if ( oxResponseObj . ads && oxResponseObj . ads . pixels ) {
16
+ makePDCall ( oxResponseObj . ads . pixels ) ;
17
+ }
18
18
19
- if ( ! adUnits ) {
20
- adUnits = [ ] ;
21
- }
19
+ if ( ! adUnits ) {
20
+ adUnits = [ ] ;
21
+ }
22
22
23
- var bids = $$PREBID_GLOBAL$$ . _bidsRequested . find ( bidSet => bidSet . bidderCode === 'openx_neo' ) . bids ;
24
- for ( let i = 0 ; i < bids . length ; i ++ ) {
25
- let bid = bids [ i ] ;
26
- let auid = null ;
27
- let adUnit = null ;
28
- // find the adunit in the response
29
- for ( let j = 0 ; j < adUnits . length ; j ++ ) {
30
- adUnit = adUnits [ j ] ;
31
- if ( String ( bid . params . unit ) === String ( adUnit . adunitid ) && ! adUnit . used ) {
32
- auid = adUnit . adunitid ;
33
- break ;
34
- }
23
+ var bids = $$PREBID_GLOBAL$$ . _bidsRequested . find ( bidSet => bidSet . bidderCode === 'openx_neo' ) . bids ;
24
+ for ( let i = 0 ; i < bids . length ; i ++ ) {
25
+ let bid = bids [ i ] ;
26
+ let auid = null ;
27
+ let adUnit = null ;
28
+ // find the adunit in the response
29
+ for ( let j = 0 ; j < adUnits . length ; j ++ ) {
30
+ adUnit = adUnits [ j ] ;
31
+ if ( String ( bid . params . unit ) === String ( adUnit . adunitid ) && adUnitHasValidSizeFromBid ( adUnit , bid ) && ! adUnit . used ) {
32
+ auid = adUnit . adunitid ;
33
+ break ;
35
34
}
35
+ }
36
36
37
- let beaconParams = {
38
- bd : + ( new Date ( ) ) - startTime ,
39
- br : '0' , // maybe 0, t, or p
40
- bt : pbjs . bidderTimeout , // mapping timeout
41
- bs : window . location . hostname
42
- } ;
37
+ let beaconParams = {
38
+ bd : + ( new Date ( ) ) - startTime ,
39
+ br : '0' , // maybe 0, t, or p
40
+ bt : pbjs . bidderTimeout , // mapping timeout
41
+ bs : window . location . hostname
42
+ } ;
43
43
44
- if ( ! auid ) {
45
- addBidResponse ( null , bid ) ;
46
- continue ;
47
- }
48
- adUnit . used = true ;
49
-
50
- if ( adUnit . pub_rev ) {
51
- beaconParams . br = beaconParams . bt < beaconParams . bd ? 't' : 'p' ;
52
- beaconParams . bp = adUnit . pub_rev ;
53
- beaconParams . ts = adUnit . ts ;
54
- addBidResponse ( adUnit , bid ) ;
55
- } else { // no fill :(
56
- addBidResponse ( null , bid ) ;
57
- }
58
- buildBoPixel ( adUnit . creative [ 0 ] , beaconParams ) ;
44
+ if ( ! auid ) {
45
+ addBidResponse ( null , bid ) ;
46
+ continue ;
59
47
}
48
+ adUnit . used = true ;
49
+
50
+ if ( adUnit . pub_rev ) {
51
+ beaconParams . br = beaconParams . bt < beaconParams . bd ? 't' : 'p' ;
52
+ beaconParams . bp = adUnit . pub_rev ;
53
+ beaconParams . ts = adUnit . ts ;
54
+ addBidResponse ( adUnit , bid ) ;
55
+ } else { // no fill :(
56
+ addBidResponse ( null , bid ) ;
57
+ }
58
+ buildBoPixel ( adUnit . creative [ 0 ] , beaconParams ) ;
59
+ }
60
60
} ;
61
61
62
62
function getViewportDimensions ( isIfr ) {
@@ -201,7 +201,7 @@ var OpenxAdapter = function OpenxAdapter(options) {
201
201
if ( bids . length === 0 ) {
202
202
return ;
203
203
}
204
-
204
+
205
205
let delDomain = bids [ 0 ] . params . delDomain ;
206
206
207
207
startTime = new Date ( params . start ) ;
0 commit comments