contextFromLink -> contextFromNode
This commit is contained in:
parent
97087af42f
commit
b3d38cbabd
@ -19,7 +19,7 @@ Get =
|
||||
if index then post.clones[index] else post
|
||||
postFromNode: (root) ->
|
||||
Get.postFromRoot $.x 'ancestor::div[contains(@class,"postContainer")][1]', root
|
||||
contextFromLink: (quotelink) ->
|
||||
contextFromNode: (quotelink) ->
|
||||
Get.postFromRoot $.x 'ancestor::div[parent::div[@class="thread"]][1]', quotelink
|
||||
postDataFromLink: (link) ->
|
||||
if link.hostname is 'boards.4chan.org'
|
||||
|
||||
@ -341,7 +341,7 @@ QR =
|
||||
$.addClass QR.nodes.el, 'dump'
|
||||
QR.cooldown.auto = true
|
||||
{com, thread} = QR.nodes
|
||||
thread.value = Get.contextFromLink(@).thread unless com.value
|
||||
thread.value = Get.contextFromNode(@).thread unless com.value
|
||||
|
||||
caretPos = com.selectionStart
|
||||
# Replace selection for text.
|
||||
|
||||
@ -13,7 +13,7 @@ QuoteInline =
|
||||
return if e.shiftKey or e.altKey or e.ctrlKey or e.metaKey or e.button isnt 0
|
||||
e.preventDefault()
|
||||
{boardID, threadID, postID} = Get.postDataFromLink @
|
||||
context = Get.contextFromLink @
|
||||
context = Get.contextFromNode @
|
||||
if $.hasClass @, 'inlined'
|
||||
QuoteInline.rm @, boardID, threadID, postID, context
|
||||
else
|
||||
|
||||
@ -18,7 +18,7 @@ QuotePreview =
|
||||
id: 'qp'
|
||||
className: 'dialog'
|
||||
$.add d.body, qp
|
||||
Get.postClone boardID, threadID, postID, qp, Get.contextFromLink @
|
||||
Get.postClone boardID, threadID, postID, qp, Get.contextFromNode @
|
||||
|
||||
UI.hover
|
||||
root: @
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user