Old way of handling quotelinks in clones was leaving resurrected quotes out of @quotes and putting duplicates in @nodes.quotelinks.
This commit is contained in:
parent
5e31c289b7
commit
30adbd6fa2
@ -10,12 +10,9 @@ Quotify =
|
|||||||
cb: @node
|
cb: @node
|
||||||
|
|
||||||
node: ->
|
node: ->
|
||||||
|
return if @isClone
|
||||||
for deadlink in $$ '.deadlink', @nodes.comment
|
for deadlink in $$ '.deadlink', @nodes.comment
|
||||||
if @isClone
|
Quotify.parseDeadlink.call @, deadlink
|
||||||
if $.hasClass deadlink, 'quotelink'
|
|
||||||
@nodes.quotelinks.push deadlink
|
|
||||||
else
|
|
||||||
Quotify.parseDeadlink.call @, deadlink
|
|
||||||
return
|
return
|
||||||
|
|
||||||
parseDeadlink: (deadlink) ->
|
parseDeadlink: (deadlink) ->
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
class Clone extends Post
|
class Clone extends Post
|
||||||
|
isClone: true
|
||||||
|
|
||||||
constructor: (@origin, @context, contractThumb) ->
|
constructor: (@origin, @context, contractThumb) ->
|
||||||
for key in ['ID', 'fullID', 'board', 'thread', 'info', 'quotes', 'isReply']
|
for key in ['ID', 'fullID', 'board', 'thread', 'info', 'quotes', 'isReply']
|
||||||
# Copy or point to the origin's key value.
|
# Copy or point to the origin's key value.
|
||||||
@ -62,6 +64,7 @@ class Clone extends Post
|
|||||||
@nodes.date = $ '.dateTime', info
|
@nodes.date = $ '.dateTime', info
|
||||||
|
|
||||||
@parseQuotes()
|
@parseQuotes()
|
||||||
|
@quotes = [@origin.quotes...]
|
||||||
|
|
||||||
if @origin.file
|
if @origin.file
|
||||||
# Copy values, point to relevant elements.
|
# Copy values, point to relevant elements.
|
||||||
@ -87,7 +90,6 @@ class Clone extends Post
|
|||||||
ImageExpand.contract @ if @file.thumb and contractThumb
|
ImageExpand.contract @ if @file.thumb and contractThumb
|
||||||
|
|
||||||
@isDead = true if @origin.isDead
|
@isDead = true if @origin.isDead
|
||||||
@isClone = true
|
|
||||||
root.dataset.clone = @origin.clones.push(@) - 1
|
root.dataset.clone = @origin.clones.push(@) - 1
|
||||||
|
|
||||||
cloneWithoutVideo: (node) ->
|
cloneWithoutVideo: (node) ->
|
||||||
|
|||||||
@ -163,13 +163,14 @@ class Post
|
|||||||
# - catalog links. (>>>/b/catalog or >>>/b/search)
|
# - catalog links. (>>>/b/catalog or >>>/b/search)
|
||||||
# - rules links. (>>>/a/rules)
|
# - rules links. (>>>/a/rules)
|
||||||
# - text-board quotelinks. (>>>/img/1234)
|
# - text-board quotelinks. (>>>/img/1234)
|
||||||
return unless match = quotelink.href.match ///
|
match = quotelink.href.match ///
|
||||||
^https?://boards\.4chan\.org/+
|
^https?://boards\.4chan\.org/+
|
||||||
([^/]+) # boardID
|
([^/]+) # boardID
|
||||||
/+(?:res|thread)/+\d+(?:/[^#]*)?#p
|
/+(?:res|thread)/+\d+(?:/[^#]*)?#p
|
||||||
(\d+) # postID
|
(\d+) # postID
|
||||||
$
|
$
|
||||||
///
|
///
|
||||||
|
return unless match or (@isClone and quotelink.dataset.postID) # normal or resurrected quote
|
||||||
|
|
||||||
@nodes.quotelinks.push quotelink
|
@nodes.quotelinks.push quotelink
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user