img when necessary.
It may not be complete; I need help testing different browsers. Patches welcome.
<script src=detect-zoom.js></script> <script> var zoom = DetectZoom.zoom(); console.log(zoom); </script>
Detect-zoom is dual-licensed under the WTFPL and MIT license, at the recipient's choice.