Forum Moderators: open
document.write('<div data-b="' + lB + '" class="med_rect" style="margin: 10px 0 20px 0">');
google_ad_client = "ca-pub-xxxx";
google_ad_slot = "xxxx";
google_ad_width = 300;
google_ad_height = 250;
document.write('<scr' + 'ipt lang' + 'uage="jav' + 'ascript" src="//pagead2.googlesyndication.com/pagead/show_ads.js"></scr' + 'ipt>');
document.write('</div>'); the content you provide should add value and be the focal point for users visiting your page. For this reason, we may limit or disable ad serving on pages with little to no value and/or excessive advertising until changes are made.
var scriptConf = document.createElement('script');
scriptConf.innerHTML = 'google_ad_client = "ca-pub-xxxx";google_ad_slot = "xxxx";google_ad_width = 300;google_ad_height = 250;';
document.write(scriptConf.outerHTML);
var scriptExec = document.createElement('script');
scriptExec.src = '//pagead2.googlesyndication.com/pagead/show_ads.js';
document.write(scriptExec.outerHTML); // Determine the numeric data-b to assign
var lB = $('[data-b]').last().data('b');
// Measure full height of <main> (rich content) </main>
var pH = document.querySelector('main').clientHeight;
// Determine how many iterations to have; 800px for each iteration
var sH = parseInt(pH / 800);
for (var i=0; i <= sH; i++) {
lB++;
document.write('<div data-b="' + lB + '" class="med_rect" style="margin: 10px 0 20px 0">');
var scriptConf = document.createElement('script');
scriptConf.innerHTML = 'google_ad_client = "ca-pub-xxxx"; google_ad_slot = "xxxx"; google_ad_width = 300; google_ad_height = 250;';
document.write(scriptConf.outerHTML);
var scriptExec = document.createElement('script');
scriptExec.src = '//pagead2.googlesyndication.com/pagead/show_ads.js';
document.write(scriptExec.outerHTML);
document.write('</div>');
document.write('<div id="local_' + lB + '">' + loading + '</div>');
// Had to move this to a separate function to load at the end
// $('#local_' + lB).ajax('local.php?lb=' + lB);
}
$(function() {
for (var j=0; j <= lB; j++) {
if ($('#local_' + j).length)
$('#local_' + j).ajax('local.php?lb=' + j);
}
});