Last active
April 7, 2019 09:45
-
-
Save jhackett1/19bbf6abdac1c8cf65d19448c676a2c0 to your computer and use it in GitHub Desktop.
Hide popups and make the page scrollable again
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var elements = document.querySelectorAll('body *') | |
for (i = 0; i < elements.length; i++) { | |
if (getComputedStyle(elements[i]).position === 'fixed') elements[i].parentNode.removeChild(elements[i]) | |
} | |
document.querySelector('body').setAttribute('style', 'overflow-y:scroll !important'); | |
document.querySelector('html').setAttribute('style', 'overflow-y:scroll !important'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment