Last active
November 11, 2020 16:49
-
-
Save crates/a3b678d6a0251b9ccbac7615440a33a7 to your computer and use it in GitHub Desktop.
Stop webpages from preventing scroll by overriding changes to "overflow"
This file contains hidden or 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
(function() { | |
'use strict'; | |
document.getElementsByTagName("HTML")[0].style.overflow = "auto"; | |
document.getElementsByTagName("BODY")[0].style.overflow = "auto"; | |
document.getElementsByTagName("HTML")[0].style.overflowY = "auto"; | |
document.getElementsByTagName("BODY")[0].style.overflowY = "auto"; | |
if (~window.location.hostname.indexOf('usatoday.com')) { | |
$('body > header').style.position = 'static'; | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment