Double Ctrl to zoom images like Edge browser
這裡顯示腳本的所有版本。 只顯示彼此間有代碼差異的版本。
🚀 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.
translate(-50%, -50%) scale(...) rotate(...)
.zoom-overlay
@downloadURL
@updateURL
fitScale * 1.4
1.6×