Skip to content

Instantly share code, notes, and snippets.

@grintor
Created April 7, 2022 13:20
Show Gist options
  • Save grintor/daa283c3b6b4d9dd185ccb0d95fc4565 to your computer and use it in GitHub Desktop.
Save grintor/daa283c3b6b4d9dd185ccb0d95fc4565 to your computer and use it in GitHub Desktop.
prevent a webpage from zooming in or out
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