Skip to content

Commit

Permalink
Merge pull request #216 from zestyxyz/same-origin-prebid
Browse files Browse the repository at this point in the history
Fix div selection
  • Loading branch information
msub2 authored Jun 26, 2024
2 parents 387333f + 37628fa commit 9ca6246
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils/networking.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const initPrebid = (adUnitId, format) => {
tude.cmd.push(function() {
tude.refreshAdsViaDivMappings([
{
divId: 'zesty-div',
divId: `zesty-div-${format}`,
baseDivId,
}
]);
Expand All @@ -81,7 +81,7 @@ const initPrebid = (adUnitId, format) => {
return { asset_url, cta_url };
}
interval = setInterval(() => {
const div = document.getElementById('zesty-div');
const div = document.getElementById(`zesty-div-${format}`);
const iframe = div.querySelector('iframe');
if (iframe) {
let urls = getUrlsFromIframe(iframe);
Expand Down Expand Up @@ -142,7 +142,7 @@ Check https://docs.zesty.xyz/guides/developers/ad-units for more information.`);
tude.cmd.push(function() {
tude.refreshAdsViaDivMappings([
{
divId: 'zesty-div',
divId: `zesty-div-${format}`,
baseDivId,
}
]);
Expand Down

0 comments on commit 9ca6246

Please sign in to comment.