Re:No cookie consent walls, scrolling isn’t consent, says EU...
by peterhil on Wednesday May 06, 2020 @04:51PM
(#23096145)
I cleaned up and improved this a little. Now it hides the fixed elements, unless their computed top is at 0px. Also makes the body to scroll automatically, as many sites set their body to fixed before the fixed popup is gone:
``` javascript:(function () { var i, elements = document.querySelectorAll('body *'); var style;
document.body.style.overflow-y = 'auto'
for (i = 0; i < elements.length; i++) {
style = getComputedStyle(elements[i]);
if (style.position === 'fixed' && style.top !== "0px") {
elements[i].style.display = 'none';
}
}
})()
```
Re:No cookie consent walls, scrolling isn’t consent, says EU...
by 0x38B on Thursday May 07, 2020 @05:45AM
(#23101273)
This is great, thank you! More precise and thorough then what I had. I'll minify it and start using it on my iPad.
Re:No cookie consent walls, scrolling isn’t consent, says EU...
by peterhil on Wednesday May 06, 2020 @04:53PM
(#23096164)
HN breaks the formatting, and does not seem to support Markdown.
Re:No cookie consent walls, scrolling isn’t consent, says EU...
by peterhil on Wednesday May 06, 2020 @02:45PM
(#23094784)
Thanks! This will save me a lot of time.
Re:No cookie consent walls, scrolling isn’t consent, says EU...
by ryanwaggoner on Wednesday May 06, 2020 @03:53PM
(#23095536)
Do you mind prepending the bookmarklet code with two spaces as described here: https://news.ycombinator.com/formatdoc
It's breaking the layout of this entire comment thread for me so I have to scroll horizontally to read all of the comments. Thanks!
The bookmarklet: