Created
April 7, 2022 13:20
-
-
Save grintor/daa283c3b6b4d9dd185ccb0d95fc4565 to your computer and use it in GitHub Desktop.
prevent a webpage from zooming in or out
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
window.addEventListener('resize', function(evt){document.body.style.zoom = 1 / window.devicePixelRatio}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment