document.write("(function() { var dion_set_0Fd9 = { target: '#articleText br', idx: 2, adid: 'dion_0Fd9', width: '200px', height: '200px' }; var windowHeight, tagScrollY, calcScroll, adTag; var res = `
`; document.querySelectorAll(dion_set_0Fd9.target)[dion_set_0Fd9.idx].insertAdjacentHTML('beforebegin', res); adTag = document.querySelector('#' + dion_set_0Fd9.adid); function runAd() { console.log('run'); windowHeight = window.innerHeight || document.documentElement.clientHeight; tagScrollY = adTag.getBoundingClientRect().top; calcScroll = tagScrollY - windowHeight; if (calcScroll < 0) { adTag.style.width = dion_set_0Fd9.width; document.removeEventListener('scroll', runAd); } } document.addEventListener('scroll', runAd);})();
")