This repository has been archived by the owner on Feb 13, 2021. It is now read-only.
forked from prebid/Prebid.js
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request prebid#134 in AOLP_ADS_JS/prebid.js from release/1…
….34.0 to aolgithub-master * commit 'f0ba90afa8b52de7a646d43928b2d51ee42e74a1': (53 commits) Added changelog entry. Added partners ids. Added dynamic ttl property for One Display and One Mobile. Prebid.js 0.34.1 release Vertamedia adapter outstream support (prebid#1860) Expose native image-type asset dimensions on bid response object (prebid#1919) Remove for of (prebid#1932) Unit-test fix (prebid#1927) Remove description_url (prebid#1922) Trion Interactive Adapter Bugfix (prebid#1925) Remove config setting from Optimatic adapter (prebid#1909) IE bug fix (prebid#1930) Clarify ad unit media filtering warning (prebid#1903) Add ReadPeak Bid Adapter (prebid#1838) Change clone function to make deep copies (prebid#1910) Serverbid 1.0 (prebid#1802) sekindoUM for prebid1.0 (prebid#1777) update auctionId to be requestId (prebid#1896) bug fixed to populate userSync default values (prebid#1897) Increment pre version ...
- Loading branch information
Showing
95 changed files
with
5,566 additions
and
2,173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<script type="text/javascript"> | ||
var pbjs = pbjs || {}; | ||
pbjs.que = pbjs.que || []; | ||
|
||
(function() { | ||
var pbjsEl = document.createElement("script"); pbjsEl.type = "text/javascript"; | ||
pbjsEl.async = true; var isHttps = 'https:' === document.location.protocol; | ||
pbjsEl.src = (isHttps ? "https" : "http") + "://acdn.adnxs.com/prebid/not-for-prod/prebid.js"; | ||
var pbjsTargetEl = document.getElementsByTagName("head")[0]; | ||
pbjsTargetEl.insertBefore(pbjsEl, pbjsTargetEl.firstChild); | ||
})(); | ||
|
||
pbjs.que.push(function() { | ||
var adUnits = [{ | ||
code: '[%%adUnitCode%%]', | ||
sizes: [%%sizes%%], | ||
bids: [%%adUnitBids%%] | ||
}]; | ||
pbjs.addAdUnits(adUnits); | ||
|
||
pbjs.requestBids({ | ||
timeout: [%%timeout%%], | ||
bidsBackHandler: function() { | ||
var iframe = document.getElementById('postbid_if_3'); | ||
var iframeDoc = iframe.contentWindow.document; | ||
var params = pbjs.getAdserverTargetingForAdUnitCode('[%%adUnitCode%%]'); | ||
|
||
// If any bidders return any creatives | ||
var bid; | ||
if(params && params['hb_adid']){ | ||
var bid; | ||
for(i=0; i< pbjs._bidsReceived.length; i++ ) { | ||
if (params['hb_adid'] === pbjs._bidsReceived[i].adId) { | ||
bid = pbjs._bidsReceived[i]; | ||
break; | ||
} | ||
} | ||
pbjs.renderAd(iframeDoc, params['hb_adid']); | ||
} else { | ||
// If no bidder return any creatives, | ||
// Passback 3rd party tag in Javascript | ||
iframe.width = [%%size0%%]; | ||
iframe.height = [%%size1%%]; | ||
iframeDoc.write('[%%passbackTagHtml%%]'); | ||
} | ||
|
||
var iframeResize = window.parent.document.getElementById('[%%targetId%%]'); | ||
iframeResize.height = (bid.height) ? bid.height+'px' : '[%%size1%%]px'; | ||
iframeResize.width = (bid.width) ? bid.width+'px' : '[%%size0%%]px'; | ||
} | ||
}); | ||
}); | ||
</script> | ||
<iframe id='postbid_if_3' FRAMEBORDER="0" SCROLLING="no" MARGINHEIGHT="0" MARGINWIDTH="0" TOPMARGIN="0" LEFTMARGIN="0" ALLOWTRANSPARENCY="true" WIDTH="0" HEIGHT="0"></iframe> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.