Danbooru Smart Canvas

Creates an adaptive canvas to enable zoom & pan for images on Danbooru (when viewing original) using scroll & drag, and click to set zoom to 1x/reset zoom

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

  • v1.2 02. 05. 2026

    Video & ugoira fixes

    • Fixed video controls scaling up with the zoom level; they now stay at native size and stick to the bottom of the video
    • Clicking on a zoomed video no longer resets the canvas (background clicks still do)
    • Dragging a zoomed video no longer toggles play/pause when you release
    • Scrub bar and volume drags work properly while zoomed
    • Same fixes apply to ugoiras now that Danbooru serves them through the same player
    • Misc cleanup and a small bug fix in the resize handler
  • v1.1 05. 06. 2025

    Big update!

    • Lots of refactoring and tidying up
    • Added an Autoscroll option (enabled by default - you'll like it!)
    • Fixed a bug that was messing up CSS transitions on the canvas and enabled a smooth transition effect
    • The canvas & image now resizes with the browser seamlessly
    • Set the zoom indicator to show 2 decimals
    • Made clicking the zoom indicator trigger the autoscroll functionality on-demand (even if the option is disabled)
    • Miscellaneous styling tweaks
  • v1.0.2 02. 06. 2025

    Fixed an issue with annotations (notes) not appearing correctly on the canvas.

  • v1.0.1 02. 06. 2025

    Increased the default zoom display (top-right) font size, and added a constant to the top of the script to allow users to easily modify as desired.

  • v1 02. 06. 2025