From fd4f3e43153da7596da0bade198e99f98b47791e Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Sat, 6 Jun 2015 11:23:42 -0700 Subject: [PATCH] support ctrl key for windows --- README.md | 4 ++-- js/zoom.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3582c5c..8e3501c 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ https://fat.github.io/zoom.js It's the best way to zoom an image. It transitions/zooms in really smoothly, and then when you're done, scrolls away, [esc] keys away, clicks away… clean af. -Also, now if you hold your meta key (`⌘`), it will open in a new tab. wow. +Also, now if you hold your meta key (`⌘` on mac) or (`ctrl` on windows), it will open in a new tab. wow. ### Where @@ -41,4 +41,4 @@ zoom.js should (in theory) work in all relevant browsers. If not, create an issu ### Who -Written by @fat, made better by you. \ No newline at end of file +Written by @fat, made better by you. diff --git a/js/zoom.js b/js/zoom.js index 7667a30..125772e 100755 --- a/js/zoom.js +++ b/js/zoom.js @@ -27,7 +27,7 @@ if (this._$body.hasClass('zoom-overlay-open')) return - if (e.metaKey) return window.open(e.target.src, '_blank') + if (e.metaKey || e.ctrlKey) return window.open(e.target.src, '_blank') if (target.width >= (window.innerWidth - Zoom.OFFSET)) return