[chrome] let middle clicks open img in tab

This commit is contained in:
James Campos 2011-04-24 23:45:20 -07:00
parent 6682b526ab
commit b84234fdf5
2 changed files with 2 additions and 3 deletions

View File

@ -1859,7 +1859,7 @@
return _results; return _results;
}, },
toggle: function(e) { toggle: function(e) {
if (e.shiftKey || e.altKey || e.ctrlKey) { if (e.shiftKey || e.altKey || e.ctrlKey || e.button !== 0) {
return; return;
} }
e.preventDefault(); e.preventDefault();

View File

@ -1412,8 +1412,7 @@ imgExpand =
$.bind thumb.parentNode, 'click', imgExpand.cb.toggle $.bind thumb.parentNode, 'click', imgExpand.cb.toggle
if imgExpand.on then imgExpand.expand thumb.parentNode if imgExpand.on then imgExpand.expand thumb.parentNode
toggle: (e) -> toggle: (e) ->
#TODO middle click (chrome) return if e.shiftKey or e.altKey or e.ctrlKey or e.button isnt 0
return if e.shiftKey or e.altKey or e.ctrlKey
e.preventDefault() e.preventDefault()
imgExpand.toggle e.target imgExpand.toggle e.target
all: (e) -> all: (e) ->