var td_screen_width = window.innerWidth;
window.addEventListener(“load”, function(){
var placeAdEl = document.getElementById(“td-ad-placeholder”);
if ( null !== placeAdEl && td_screen_width >= 1140 ) {
/* large monitors */
var adEl = document.createElement(“ins”);
placeAdEl.replaceWith(adEl);
adEl.setAttribute(“class”, “adsbygoogle”);
adEl.setAttribute(“style”, “display:inline-block;width:468px;height:60px”);
adEl.setAttribute(“data-ad-client”, “ca-pub-8186661488602952”);
adEl.setAttribute(“data-ad-slot”, “”);
(adsbygoogle = window.adsbygoogle || []).push({});
}
});window.addEventListener(“load”, function(){
var placeAdEl = document.getElementById(“td-ad-placeholder”);
if ( null !== placeAdEl && td_screen_width >= 1019 && td_screen_width = 768 && td_screen_width < 1019 ) {
/* portrait tablets */
var adEl = document.createElement("ins");
placeAdEl.replaceWith(adEl);
adEl.setAttribute("class", "adsbygoogle");
adEl.setAttribute("style", "display:inline-block;width:468px;height:60px");
adEl.setAttribute("data-ad-client", "ca-pub-8186661488602952");
adEl.setAttribute("data-ad-slot", "");
(adsbygoogle = window.adsbygoogle || []).push({});
}
});window.addEventListener("load", function(){
var placeAdEl = document.getElementById("td-ad-placeholder");
if ( null !== placeAdEl && td_screen_width < 768 ) {
/* Phones */
var adEl = document.createElement("ins");
placeAdEl.replaceWith(adEl);
adEl.setAttribute("class", "adsbygoogle");
adEl.setAttribute("style", "display:inline-block;width:300px;height:250px");
adEl.setAttribute("data-ad-client", "ca-pub-8186661488602952");
adEl.setAttribute("data-ad-slot", "");
(adsbygoogle = window.adsbygoogle || []).push({});
}
});