Skip to content

skeltoac/detect-zoom

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Javascript Zoom Detector

Detect the zoom level of the user's browser using Javascript. This can be used to show higher-resolution canvas or img when necessary.

It may not be complete; I need help testing different browsers. Patches welcome.

Usage:

<script src=detect-zoom.js></script>
<script>
  var zoom = DetectZoom.zoom();
  
  console.log(zoom);
</script>

Demo

Dimensions test

License

Detect-zoom is dual-licensed under the WTFPL and MIT license, at the recipient's choice.

About

Detect zoom level using Javascript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%