Better QuoteInline process

This commit is contained in:
Zixaphir 2014-01-13 00:09:43 -07:00
parent 3f849a95d8
commit 971b7d971e
5 changed files with 66 additions and 59 deletions

View File

@ -1,5 +1,5 @@
/*
* 4chan X - Version 1.3.1 - 2014-01-12
* 4chan X - Version 1.3.1 - 2014-01-13
*
* Licensed under the MIT license.
* https://github.com/seaweedchan/4chan-x/blob/master/LICENSE

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -90,6 +90,7 @@ div.navLinks {
.reply > .file > .fileText {
margin: 0 20px;
}
.inlined + .hashlink,
[hidden] {
display: none !important;
}

View File

@ -2,18 +2,15 @@ QuoteInline =
init: ->
return if g.VIEW is 'catalog' or !Conf['Quote Inlining']
if Conf['Quote Hash Navigation']
@node = ->
for link in @nodes.quotelinks.concat [@nodes.backlinks...]
$.after link, QuoteInline.qiQuote link, $.hasClass link, 'filtered' unless @isClone
$.on link, 'click', QuoteInline.toggle
return
@process = if Conf['Quote Hash Navigation']
(link, clone) ->
$.after link, QuoteInline.qiQuote link, $.hasClass link, 'filtered' unless clone
$.on link, 'click', QuoteInline.toggle
else
@node = ->
for link in @nodes.quotelinks.concat [@nodes.backlinks...]
$.on link, 'click', QuoteInline.toggle
return
(link) ->
$.on link, 'click', QuoteInline.toggle
if Conf['Comment Expansion']
ExpandComment.callbacks.push @node
@ -22,6 +19,13 @@ QuoteInline =
name: 'Quote Inlining'
cb: @node
node: ->
{process} = QuoteInline
{isClone} = @
process link, isClone for link in @nodes.quotelinks
process link, isClone for link in @nodes.backlinks
return
qiQuote: (link, hidden) ->
[
$.tn(' ')