function isDisplayed(el){ try{ if(!el) return false; var cur = el; while(cur){ if(cur === document.body) break; var cs = window.getComputedStyle ? window.getComputedStyle(cur) : null; if(cs){ if(cs.display === 'none') return false; if(cs.visibility === 'hidden') return false; } cur = cur.parentElement; } return true; }catch(_e){ return true; } } if(!isDisplayed(host) || !isDisplayed(ins)){ if((tryCount || 0) < 30){ setTimeout(function(){ pushWhenVisible((tryCount || 0) + 1); }, 200); } return; } var rect = ins.getBoundingClientRect ? ins.getBoundingClientRect() : null; var w = rect ? rect.width : (ins.offsetWidth || 0); // Also require host width to be available (avoids availableWidth=0 TagError) var hostRect = host && host.getBoundingClientRect ? host.getBoundingClientRect() : null; var hostW = hostRect ? hostRect.width : (host ? (host.clientWidth || host.offsetWidth || 0) : 0); var effectiveW = Math.max(Number(w || 0), Number(hostW || 0)); if(effectiveW && effectiveW > 0){ try{ ins.setAttribute('data-ads-pushed', '1'); }catch(_e){} try{ (adsbygoogle = window.adsbygoogle || []).push({}); }catch(e){} return; } if((tryCount || 0) < 30){ setTimeout(function(){ pushWhenVisible((tryCount || 0) + 1); }, 200); } }catch(e){} } pushWhenVisible(0); })();

チャットルーム