If Quote Preview is enabled, links to threads in the internal archive will show previews of the OP on hover, as the native extension does. #1256

This commit is contained in:
ccd0 2017-01-27 18:27:34 -08:00
parent 0fd86194fe
commit edd7e14cf3
2 changed files with 9 additions and 1 deletions

View File

@ -1,6 +1,13 @@
QuotePreview =
init: ->
return unless g.VIEW in ['index', 'thread'] and Conf['Quote Previewing']
return unless Conf['Quote Previewing']
if g.VIEW is 'archive'
$.on d, 'mouseover', (e) ->
if e.target.nodeName is 'A' and $.hasClass(e.target, 'quotelink')
QuotePreview.mouseover.call e.target, e
return unless g.VIEW in ['index', 'thread']
if Conf['Comment Expansion']
ExpandComment.callbacks.push @node

View File

@ -14,6 +14,7 @@ class Fetcher
insert: (post) ->
# Stop here if the container has been removed while loading.
return unless @root.parentNode
@quoter or= post
clone = post.addClone @quoter.context, ($.hasClass @root, 'dialog')
Main.callbackNodes 'Post', [clone]