Use the same test for checking whether links are cross-thread.
This commit is contained in:
parent
e718c72a5a
commit
4a5d77b5ca
@ -39,7 +39,7 @@ QuoteBacklink =
|
|||||||
nodes = if container.firstChild then [$.tn(' '), link] else [link]
|
nodes = if container.firstChild then [$.tn(' '), link] else [link]
|
||||||
if Conf['Quote Previewing']
|
if Conf['Quote Previewing']
|
||||||
$.on link, 'mouseover', QuotePreview.mouseover
|
$.on link, 'mouseover', QuotePreview.mouseover
|
||||||
if Conf['Quote Inlining'] and not (Conf['Inline Cross-thread Quotes Only'] and link.getAttribute('href')[0] is '#')
|
if Conf['Quote Inlining'] and not (Conf['Inline Cross-thread Quotes Only'] and not QuoteInline.isCrossThread(link))
|
||||||
$.on link, 'click', QuoteInline.toggle
|
$.on link, 'click', QuoteInline.toggle
|
||||||
if Conf['Quote Hash Navigation']
|
if Conf['Quote Hash Navigation']
|
||||||
hash = QuoteInline.qiQuote link, $.hasClass link, 'filtered'
|
hash = QuoteInline.qiQuote link, $.hasClass link, 'filtered'
|
||||||
|
|||||||
@ -17,16 +17,16 @@ QuoteInline =
|
|||||||
return
|
return
|
||||||
|
|
||||||
process: (link, clone) ->
|
process: (link, clone) ->
|
||||||
return if (
|
return if Conf['Inline Cross-thread Quotes Only'] and not QuoteInline.isCrossThread(link)
|
||||||
Conf['Inline Cross-thread Quotes Only'] and
|
|
||||||
link.pathname is location.pathname and
|
|
||||||
link.host is location.host and
|
|
||||||
link.protocol is location.protocol
|
|
||||||
)
|
|
||||||
if Conf['Quote Hash Navigation']
|
if Conf['Quote Hash Navigation']
|
||||||
$.after link, QuoteInline.qiQuote link, $.hasClass link, 'filtered' unless clone
|
$.after link, QuoteInline.qiQuote link, $.hasClass link, 'filtered' unless clone
|
||||||
$.on link, 'click', QuoteInline.toggle
|
$.on link, 'click', QuoteInline.toggle
|
||||||
|
|
||||||
|
isCrossThread: (link) ->
|
||||||
|
link.pathname isnt location.pathname or
|
||||||
|
link.host isnt location.host or
|
||||||
|
link.protocol isnt location.protocol
|
||||||
|
|
||||||
qiQuote: (link, hidden) ->
|
qiQuote: (link, hidden) ->
|
||||||
name = "hashlink"
|
name = "hashlink"
|
||||||
name += " filtered" if hidden
|
name += " filtered" if hidden
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user