Double Ctrl Image Zoom (Edge Style)

Double Ctrl to zoom images like Edge browser

这些是此脚本变更过代码的版本。 显示所有版本。

  • v1.03 2025-10-20

    🚀 Version 1.03 – Drag & Pan + Auto-Update

    • 🖐️ Click-drag panning with smooth inertia (grab/grabbing cursor), plus automatic clamping to keep the image in view.
    • 🧭 Smart bounds & margin: prevents empty edges on large zooms and allows a small pan margin for smaller images.
    • 🧮 Refined transform pipeline: centered anchoring with translate(-50%, -50%) scale(...) rotate(...) and absolute positioning for crisp motion.
    • ⌨️ Improved Double-Ctrl detection: debounced with keyup/keydown so holding Ctrl doesn’t trigger repeats or false positives.
    • 🧹 Stronger cleanup: removes all .zoom-overlay remnants and resets pan/zoom state on close.
    • 🖱️ Wheel-to-zoom preserved and background page scroll is blocked while the viewer is open.
    • 🔁 Rotation & zoom limits kept: quick 90° rotate; zoom range remains 0.2×–5×.
    • ⚡ Smoother interactions: disables transitions while dragging, restores them after; reduced layout jank.
    • 🛠️ UI tweaks: toolbar uses fixed positioning for stability; minor polish on fade-in/out.
    • 📦 Userscript metadata: added @downloadURL and @updateURL for GreasyFork auto-updates.
    • 🐞 Misc fixes: prevents text selection during drag and tidies duplicate event paths.

  • v1.02 2025-10-15

    🆕 Version 1.02 – Edge-like Viewer Upgrade

    • 🖱️ Added mouse-wheel zoom support - scroll up/down to zoom in/out when the overlay is open.
    • 🚫 Disabled background page scrolling while the overlay is active for smoother control.
    • 🤖 Improved smart initial zoom: small images now pop gently, large ones fit perfectly within the viewport.
    • ⚙️ Refined default zoom ratio (fitScale * 1.4, capped at 1.6×) for a more natural look.
    • 🪄 Fixed issue where ultra-wide images could appear too large.
    • ⚡ Optimized image load timing and transform updates.
    • 💅 General polish: smoother transitions, better responsiveness, cleaner overlay behavior.
  • v1.01 2025-10-15