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
|
true
|
||||||
|
|
||||||
catalogNode: ->
|
catalogNode: ->
|
||||||
$.on @nodes.thumb.parentNode, 'click', Index.onClick
|
$.on @nodes.root, 'mousedown click', (e) ->
|
||||||
|
return unless e.button is 0 and e.shiftKey
|
||||||
onClick: (e) ->
|
Index.toggleHide g.threads[@dataset.fullID] if e.type is 'click'
|
||||||
return if e.button isnt 0
|
e.preventDefault() # Also on mousedown to prevent highlighting text.
|
||||||
thread = g.threads[@parentNode.dataset.fullID]
|
|
||||||
if e.shiftKey
|
|
||||||
Index.toggleHide thread
|
|
||||||
else
|
|
||||||
return
|
|
||||||
e.preventDefault()
|
|
||||||
|
|
||||||
toggleHide: (thread) ->
|
toggleHide: (thread) ->
|
||||||
$.rm thread.catalogView.nodes.root
|
$.rm thread.catalogView.nodes.root
|
||||||
|
|||||||
@ -97,13 +97,10 @@ ThreadWatcher =
|
|||||||
|
|
||||||
catalogNode: ->
|
catalogNode: ->
|
||||||
$.addClass @nodes.root, 'watched' if ThreadWatcher.isWatched @thread
|
$.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
|
return unless e.button is 0 and e.altKey
|
||||||
ThreadWatcher.toggle @thread
|
ThreadWatcher.toggle g.threads[@dataset.fullID] if e.type is 'click'
|
||||||
e.preventDefault()
|
e.preventDefault() # Also on mousedown to prevent highlighting thumbnail in Firefox.
|
||||||
$.on @nodes.thumb.parentNode, 'mousedown', (e) ->
|
|
||||||
# Prevent highlighting thumbnail in Firefox.
|
|
||||||
e.preventDefault() if e.button is 0 and e.altKey
|
|
||||||
|
|
||||||
addDialog: ->
|
addDialog: ->
|
||||||
return unless Main.isThisPageLegit()
|
return unless Main.isThisPageLegit()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user