Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 460 Bytes

README.md

File metadata and controls

17 lines (11 loc) · 460 Bytes

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