Implement 'Inline Cross-thread Quotes Only'. #513

This commit is contained in:
ccd0 2015-12-06 18:57:59 -08:00
parent cb4fd837c6
commit 71f03b8abe
3 changed files with 7 additions and 1 deletions

View File

@ -516,6 +516,11 @@ Config =
true
'Inline quoted post on click.'
]
'Inline Cross-thread Quotes Only': [
false
'Only inline quote links when the posts are on another thread or board, or fetched from the archive.'
1
]
'Quote Hash Navigation': [
false
'Include an extra link after quotes for autoscrolling to quoted posts.'

View File

@ -39,7 +39,7 @@ QuoteBacklink =
nodes = if container.firstChild then [$.tn(' '), link] else [link]
if Conf['Quote Previewing']
$.on link, 'mouseover', QuotePreview.mouseover
if Conf['Quote Inlining']
if Conf['Quote Inlining'] and not (Conf['Inline Cross-thread Quotes Only'] and link.getAttribute('href')[0] is '#')
$.on link, 'click', QuoteInline.toggle
if Conf['Quote Hash Navigation']
hash = QuoteInline.qiQuote link, $.hasClass link, 'filtered'

View File

@ -17,6 +17,7 @@ QuoteInline =
return
process: (link, clone) ->
return if Conf['Inline Cross-thread Quotes Only'] and link.getAttribute('href')[0] is '#'
if Conf['Quote Hash Navigation']
$.after link, QuoteInline.qiQuote link, $.hasClass link, 'filtered' unless clone
$.on link, 'click', QuoteInline.toggle