Skip to content

Commit fd4f3e4

Browse files
Jacob ThorntonJacob Thornton
authored andcommitted
support ctrl key for windows
1 parent e659a0d commit fd4f3e4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ https://fat.github.io/zoom.js
3131

3232
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.
3333

34-
Also, now if you hold your meta key (``), it will open in a new tab. wow.
34+
Also, now if you hold your meta key (`` on mac) or (`ctrl` on windows), it will open in a new tab. wow.
3535

3636

3737
### Where
@@ -41,4 +41,4 @@ zoom.js should (in theory) work in all relevant browsers. If not, create an issu
4141

4242
### Who
4343

44-
Written by <a href="//twitter.com/fat">@fat</a>, made better by you.
44+
Written by <a href="//twitter.com/fat">@fat</a>, made better by you.

js/zoom.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
if (this._$body.hasClass('zoom-overlay-open')) return
2929

30-
if (e.metaKey) return window.open(e.target.src, '_blank')
30+
if (e.metaKey || e.ctrlKey) return window.open(e.target.src, '_blank')
3131

3232
if (target.width >= (window.innerWidth - Zoom.OFFSET)) return
3333

0 commit comments

Comments
 (0)