|
|
|
|
|
by seanlinehan
331 days 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');}}()) |
|
> Kill-sticky, a bookmarklet to remove sticky elements and restore scrolling (174 comments)
— https://news.ycombinator.com/item?id=32998091
[0] https://daringfireball.net/linked/2017/06/27/mcdiarmid-stick...