Make Shift+click to hide and Alt+click to watch work anywhere on catalog thread.
This commit is contained in:
parent
921fd1ede0
commit
4a8ee7e3a4
@ -185,16 +185,10 @@ Index =
|
||||
true
|
||||
|
||||
catalogNode: ->
|
||||
$.on @nodes.thumb.parentNode, 'click', Index.onClick
|
||||
|
||||
onClick: (e) ->
|
||||
return if e.button isnt 0
|
||||
thread = g.threads[@parentNode.dataset.fullID]
|
||||
if e.shiftKey
|
||||
Index.toggleHide thread
|
||||
else
|
||||
return
|
||||
e.preventDefault()
|
||||
$.on @nodes.root, 'mousedown click', (e) ->
|
||||
return unless e.button is 0 and e.shiftKey
|
||||
Index.toggleHide g.threads[@dataset.fullID] if e.type is 'click'
|
||||
e.preventDefault() # Also on mousedown to prevent highlighting text.
|
||||
|
||||
toggleHide: (thread) ->
|
||||
$.rm thread.catalogView.nodes.root
|
||||
|
||||
@ -97,13 +97,10 @@ ThreadWatcher =
|
||||
|
||||
catalogNode: ->
|
||||
$.addClass @nodes.root, 'watched' if ThreadWatcher.isWatched @thread
|
||||
$.on @nodes.thumb.parentNode, 'click', (e) =>
|
||||
$.on @nodes.root, 'mousedown click', (e) ->
|
||||
return unless e.button is 0 and e.altKey
|
||||
ThreadWatcher.toggle @thread
|
||||
e.preventDefault()
|
||||
$.on @nodes.thumb.parentNode, 'mousedown', (e) ->
|
||||
# Prevent highlighting thumbnail in Firefox.
|
||||
e.preventDefault() if e.button is 0 and e.altKey
|
||||
ThreadWatcher.toggle g.threads[@dataset.fullID] if e.type is 'click'
|
||||
e.preventDefault() # Also on mousedown to prevent highlighting thumbnail in Firefox.
|
||||
|
||||
addDialog: ->
|
||||
return unless Main.isThisPageLegit()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user