4chan-x/src/Quotelinks/QuoteStrikeThrough.coffee
ccd0 742184d2c0 Merge from Appchan X: src/Quotelinks
deferred: QuoteBacklinks.coffee, QuoteMarkers.coffee, and related changes (including change in QuoteInline.qiQuote)
2015-02-01 16:12:36 -08:00

17 lines
500 B
CoffeeScript
Executable File

QuoteStrikeThrough =
init: ->
return unless g.VIEW in ['index', 'thread'] and
(Conf['Reply Hiding Buttons'] or (Conf['Menu'] and Conf['Reply Hiding Link']) or Conf['Filter'])
Post.callbacks.push
name: 'Strike-through Quotes'
cb: @node
node: ->
return if @isClone
for quotelink in @nodes.quotelinks
{boardID, postID} = Get.postDataFromLink quotelink
if g.posts["#{boardID}.#{postID}"]?.isHidden
$.addClass quotelink, 'filtered'
return