Forum Moderators: open
<ins class="adsbygoogle"
// Note that the height isn't hard-coded on my end, it's just what shows up in DevTools
style="display: block; height: 280px;"
data-ad-client="ca-pub-xxxx"
data-ad-slot="xxxx"
data-ad-format="auto"
data-full-width-responsive="true"
// data-adsbygoogle-status isn't hard-coded, either, so I'm not sure why it shows up
data-adsbygoogle-status="done">
////// nothing from here to the next-to-last </ins> is hard coded
////// spacing and line breaks are added by me for legibility
// everything here looks the same every time I've loaded, until you get to SRC
<ins id="aswift_1_expand"
style="display:inline-table;border:none;height:280px;margin:0;padding:0;position:relative;visibility:visible;width:975px;background-color:transparent;">
<ins id="aswift_1_anchor"
style="display:block;border:none;height:280px;margin:0;padding:0;position:relative;visibility:visible;width:975px;background-color:transparent;">
<iframe width="975" height="280" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" allowfullscreen="true"
onload="var i=this.id,
s=window.google_iframe_oncopy,
H=s&&s.handlers,
h=H&&H[i],
w=this.contentWindow,
d;
try{d=w.document}
catch(e){}
if(h&&d&&(!d.body||!d.body.firstChild)){
if(h.call){
setTimeout(h,0)
}
else if(h.match){
try{h=s.upd(h,i)}
catch(e){}
w.location.replace(h)
}
}"
id="aswift_1"
name="aswift_1"
style="left: 0px; position: absolute; top: 0px; border: 0px; width: 975px; height: 280px; overflow: visible;">
<html>
<head></head>
<body marginwidth="0" marginheight="0">
<script>
google_sl_win=window.parent;
google_iframe_start_time=new Date().getTime();
google_async_iframe_id="aswift_1";
</script>
<script>
window.parent.google_sa_impl(
{
iframeWin: window,
pubWin: window.parent,
vars: window.parent['google_sv_map']['aswift_1']
}
);
</script>
<iframe id="google_ads_frame1"
name="google_ads_frame1"
sandbox="allow-forms allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation"
width="975" height="280" frameborder="0"
//////////////////////////////////////////////////////////
// This is the only part that changes
src="https://blahblahblah..."
//////////////////////////////////////////////////////////
marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" allowfullscreen="true"
data-google-container-id="1.smu3bx8vvxyz"
data-google-query-id="CJ_Tq9KBmOQCFTIIZQoduJECgA"
data-load-complete="true">
</iframe>
</body>
</html>
</iframe>
</ins>
</ins>
////// this ends the part that's not hard coded
</ins>
var interval = setInterval(function() {
if (document.readyState === 'complete') {
clearInterval(interval);
if (document.getElementById('aswift_1'))
console.log('found')
}
}, 500); var interval = setInterval(function() {
if (document.readyState === 'complete') {
clearInterval(interval);
if (document.getElementById('google_ads_frame1'))
console.log('found');
else
console.log('not found');
}
}, 500); var interval = setInterval(function() {
if (document.readyState === 'complete') {
clearInterval(interval);
// this doesn't actually work, and I'm not sure why
document.getElementById('aswift_1').onload = function() {
console.log('aswift_1 loaded');
}
}
}, 500); var interval = setInterval(function() {
if (document.readyState === 'complete') {
clearInterval(interval);
// I created a <div id="result"></div> element for testing
var result = document.getElementById('result');
if (document.getElementById('aswift_1')) {
if (document.getElementById('aswift_1').hasChildNodes()) {
var children = document.getElementById('aswift_1').childNodes,
i;
// Weird... without this, the next section fails
for (i=0; i < children.length; i++) {
result.innerHTML += children[i].nodeValue + ' ';
}
}
}
if (document.getElementById('google_ads_frame1')) {
document.getElementById('google_ads_frame1').onload = function() {
result.innerHTML += '(frame element loaded)<br>';
}
}
}
}, 500);