top | item 44588889

(no title)

seanlinehan | 7 months ago

I have this little bookmarklet in my bookmarks bar that I use constantly. It removes all fixed or sticky elements on the page and re-enabled y-overflow if it was disabled:

javascript: (function () {document.querySelectorAll("body *").forEach(function(node){["fixed","sticky"].includes(getComputedStyle(node).position)&&node.parentNode.removeChild(node)});var htmlNode=document.querySelector("html");htmlNode.style.overflow="visible",htmlNode.style["overflow-x"]="visible",htmlNode.style["overflow-y"]="visible";var bodyNode=document.querySelector("body");bodyNode.style.overflow="visible",bodyNode.style["overflow-x"]="visible",bodyNode.style["overflow-y"]="visible";var nodes=document.querySelectorAll('.tp-modal-open');for(i in nodes) {nodes[i].classList.remove('tp-modal-open');}}())

discuss

order