Shift+click to hide threads in the catalog.
Conflicts: src/Filtering/ThreadHiding.coffee
This commit is contained in:
parent
5a456f0cbe
commit
ab42ad2409
@ -113,7 +113,8 @@ Filter =
|
|||||||
|
|
||||||
# Highlight
|
# Highlight
|
||||||
$.addClass @nodes.root, result.class
|
$.addClass @nodes.root, result.class
|
||||||
@thread.highlight = result.class
|
unless result.class in @highlights
|
||||||
|
(@highlights or= []).push result.class
|
||||||
if !@isReply and result.top
|
if !@isReply and result.top
|
||||||
@thread.isOnTop = true
|
@thread.isOnTop = true
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
ThreadHiding =
|
ThreadHiding =
|
||||||
init: ->
|
init: ->
|
||||||
return if g.VIEW isnt 'index' or !Conf['Thread Hiding Buttons'] and !Conf['Thread Hiding Link']
|
return if g.VIEW isnt 'index'
|
||||||
|
|
||||||
@db = new DataBoard 'hiddenThreads'
|
@db = new DataBoard 'hiddenThreads'
|
||||||
@syncCatalog()
|
@syncCatalog()
|
||||||
|
|||||||
@ -363,7 +363,7 @@ Build =
|
|||||||
'<div class="comment">&{thread.OP.nodes.comment}</div>'
|
'<div class="comment">&{thread.OP.nodes.comment}</div>'
|
||||||
) %>
|
) %>
|
||||||
|
|
||||||
$.addClass root, thread.highlight if thread.highlight
|
$.addClass root, thread.OP.highlights... if thread.OP.highlights
|
||||||
|
|
||||||
if thread.isSticky
|
if thread.isSticky
|
||||||
$.add $('.thread-icons', root), $.el 'img',
|
$.add $('.thread-icons', root), $.el 'img',
|
||||||
|
|||||||
@ -55,6 +55,17 @@ class Thread
|
|||||||
getCatalogView: ->
|
getCatalogView: ->
|
||||||
return @catalogView if @catalogView
|
return @catalogView if @catalogView
|
||||||
@catalogView = Build.threadCatalog @
|
@catalogView = Build.threadCatalog @
|
||||||
|
$.on $('.thumb', @catalogView), 'click', @onCatalogViewClick
|
||||||
|
@catalogView
|
||||||
|
onCatalogViewClick: (e) =>
|
||||||
|
return if e.button isnt 0
|
||||||
|
if e.shiftKey
|
||||||
|
$.rm @catalogView
|
||||||
|
ThreadHiding.hide @
|
||||||
|
ThreadHiding.saveHiddenState @
|
||||||
|
else
|
||||||
|
return
|
||||||
|
e.preventDefault()
|
||||||
|
|
||||||
kill: ->
|
kill: ->
|
||||||
@isDead = true
|
@isDead = true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user