diff --git a/src/web_accessible_resources/googlesyndication_adsbygoogle.js b/src/web_accessible_resources/googlesyndication_adsbygoogle.js index 4a2da9676..5a6fc82bc 100644 --- a/src/web_accessible_resources/googlesyndication_adsbygoogle.js +++ b/src/web_accessible_resources/googlesyndication_adsbygoogle.js @@ -37,10 +37,12 @@ const css = 'height:1px!important;max-height:1px!important;max-width:1px!important;width:1px!important;'; for ( let i = 0; i < phs.length; i++ ) { const fr = document.createElement('iframe'); - fr.id = 'aswift_' + (i+1); + const id = `aswift_${(i+1)}`; + if ( document.querySelector(`iframe#${id}`) !== null ) { continue; } + fr.id = id; fr.style = css; const cfr = document.createElement('iframe'); - cfr.id = 'google_ads_frame' + i; + cfr.id = `google_ads_frame${i}`; fr.appendChild(cfr); document.body.appendChild(fr); }