Skip to content

Commit

Permalink
Fix for #8421 (#8493)
Browse files Browse the repository at this point in the history
  • Loading branch information
parisholley authored May 31, 2022
1 parent 5e44a1b commit e5b3877
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions modules/mantisBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {registerBidder} from '../src/adapters/bidderFactory.js';
import { getStorageManager } from '../src/storageManager.js';
import { ajax } from '../src/ajax.js';

export const storage = getStorageManager({bidderCode: 'mantis'});

Expand All @@ -10,12 +11,7 @@ function inIframe() {
return true;
}
}
function pixel(url, parent) {
var img = document.createElement('img');
img.src = url;
img.style.cssText = 'display:none !important;';
(parent || document.body).appendChild(img);
}

export function onVisible(win, element, doOnVisible, time, pct) {
var started = null;
var notified = false;
Expand Down Expand Up @@ -301,9 +297,9 @@ export function iframePostMessage (win, name, callback) {

onMessage('iframe', function (data) {
if (window.$sf) {
sfPostMessage(window.$sf, data.width, data.height, () => pixel(data.pixel));
sfPostMessage(window.$sf, data.width, data.height, () => ajax(data.pixel));
} else {
iframePostMessage(window, data.frame, () => pixel(data.pixel));
iframePostMessage(window, data.frame, () => ajax(data.pixel));
}
});

Expand Down

0 comments on commit e5b3877

Please sign in to comment.