Toggle Zoom

Extend image zoom modes with scale-to-width and scale-to-height of window

These are versions of this script where the code was updated. Show all versions.

  • v0.5 2023-12-25

    Fixed weird behavior in Firefox. Apparently it too now needs a stopPropagation :/

  • v0.4.1 2022-01-24

    What the fuck, Mozilla? In Firefox 96, document.body.clientHeight always is 0 for pictures. Fixed by using a different source for height.

  • v0.4 2020-12-26 Rework, add fitToHeight
  • v0.1 2016-01-31