.hasinline
This commit is contained in:
parent
a9efc9d79d
commit
e38ec8a6b7
@ -54,7 +54,12 @@ QuoteInline =
|
|||||||
inline = $.el 'div',
|
inline = $.el 'div',
|
||||||
id: "i#{postID}"
|
id: "i#{postID}"
|
||||||
className: 'inline'
|
className: 'inline'
|
||||||
$.after QuoteInline.findRoot(quotelink, isBacklink), inline
|
root = QuoteInline.findRoot(quotelink, isBacklink)
|
||||||
|
$.after root, inline
|
||||||
|
|
||||||
|
qroot = $.x 'ancestor::*[contains(@class,"postContainer")][1]', root
|
||||||
|
|
||||||
|
$.addClass qroot, 'hasInline'
|
||||||
Get.postClone boardID, threadID, postID, inline, context
|
Get.postClone boardID, threadID, postID, inline, context
|
||||||
|
|
||||||
return unless (post = g.posts["#{boardID}.#{postID}"]) and
|
return unless (post = g.posts["#{boardID}.#{postID}"]) and
|
||||||
@ -76,8 +81,12 @@ QuoteInline =
|
|||||||
# Select the corresponding inlined quote, and remove it.
|
# Select the corresponding inlined quote, and remove it.
|
||||||
root = QuoteInline.findRoot quotelink, isBacklink
|
root = QuoteInline.findRoot quotelink, isBacklink
|
||||||
root = $.x "following-sibling::div[@id='i#{postID}'][1]", root
|
root = $.x "following-sibling::div[@id='i#{postID}'][1]", root
|
||||||
|
qroot = $.x 'ancestor::*[contains(@class,"postContainer")][1]', root
|
||||||
$.rm root
|
$.rm root
|
||||||
|
|
||||||
|
unless $ '.inline', qroot
|
||||||
|
$.rmClass qroot, 'hasInline'
|
||||||
|
|
||||||
# Stop if it only contains text.
|
# Stop if it only contains text.
|
||||||
return unless el = root.firstElementChild
|
return unless el = root.firstElementChild
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user