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

نووسەر
Broodyr
Daily installs
0
Total installs
1
Ratings
0 0 0
وەشان
1.1
Created
2025-06-02
Updated
2025-06-05
Size
21.6 KB
مۆڵەت
MIT
Applies to

Enhance your image viewing experience on Danbooru! This script allows you to zoom and pan with your mouse when viewing a full-size image post. It sets the image within a canvas based on your browser size, maximizing the usage of screen space, and automatically scrolls it fully into view. The image will initially be scaled down to fill the canvas (if image is larger), or shown at original size (if image is smaller).

How to Use:

  • Zoom: Use your mouse scroll wheel to zoom in and out of the image (up to 3x zoom)
  • Pan: When zoomed in, click and drag the image to pan around
  • 1x Zoom/Reset:
    • Click the image once to set the zoom level to 100% (1x)
    • If already at 1x zoom, click again to reset the image to fit within the canvas
  • Scroll-to-canvas: Clicking on the zoom indicator (top right of canvas) will scroll the canvas perfectly into view

Settings:

These can be configured from your userscript manager's menu.

[Default] Setting: Description

  • [Enabled] Panning: Allows panning the image. If you prefer to keep the default image dragging behavior at all zoom levels, you can disable this. Note that the image is always draggable at the initial zoom level, regardless of this setting
  • [Enabled] Autoscrolling: Automatically scrolls to the canvas on canvas creation