ncG1vNJzZmivlZy8tcDHoqqcp6aav6awjZympmeRqsGpu9FoqpynpKmxtsPEaA%3D%3D
Scott Duwe, Author at We Got This Covered
Skip to content `; var newStickySidebar = (new DOMParser().parseFromString(html, 'text/html')).body.firstChild; newStickySidebar.style.position = 'relative'; newStickySidebar.style.marginBottom = '20px'; newStickySidebar.classList.add(`post-${postId}`); newStickySidebar.style.height = document.querySelector(`.gamurs-inf-scroll-post.post-${postId}`).offsetHeight - 20 + 'px'; document.querySelector('aside#secondary').appendChild(newStickySidebar); window.addEventListener('scroll', function() { document.querySelector(`.sticky-sidebar-container.post-${postId}`).style.height = document.querySelector(`.gamurs-inf-scroll-post.post-${postId}`).offsetHeight - 20 + 'px'; }); })(); }