contextFromLink -> contextFromNode

This commit is contained in:
Mayhem 2013-07-02 18:21:05 +02:00
parent 97087af42f
commit b3d38cbabd
4 changed files with 4 additions and 4 deletions

View File

@ -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'

View File

@ -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.

View File

@ -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

View File

@ -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: @