Skip to content

Commit

Permalink
Update prebid.js (#8190)
Browse files Browse the repository at this point in the history
  • Loading branch information
patmmccann authored Mar 18, 2022
1 parent 9761aaa commit 6ca0503
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/prebid.js
Original file line number Diff line number Diff line change
Expand Up @@ -474,16 +474,6 @@ $$PREBID_GLOBAL$$.renderAd = hook('async', function (doc, id, options) {
const message = `Error trying to write ad. Ad render call ad id ${id} was prevented from writing to the main document.`;
emitAdRenderFail({reason: PREVENT_WRITING_ON_MAIN_DOCUMENT, message, bid, id});
} else if (ad) {
// will check if browser is firefox and below version 67, if so execute special doc.open()
// for details see: https://github.com/prebid/Prebid.js/pull/3524
// TODO remove this browser specific code at later date (when Firefox < 67 usage is mostly gone)
if (navigator.userAgent && navigator.userAgent.toLowerCase().indexOf('firefox/') > -1) {
const firefoxVerRegx = /firefox\/([\d\.]+)/;
let firefoxVer = navigator.userAgent.toLowerCase().match(firefoxVerRegx)[1]; // grabs the text in the 1st matching group
if (firefoxVer && parseInt(firefoxVer, 10) < 67) {
doc.open('text/html', 'replace');
}
}
doc.write(ad);
doc.close();
setRenderSize(doc, width, height);
Expand Down

0 comments on commit 6ca0503

Please sign in to comment.