Fix quoting crashing when you have selected something not inside a post.
This commit is contained in:
parent
cf0c72941e
commit
327df159cc
@ -12,6 +12,7 @@ Get =
|
|||||||
threadFromNode: (node) ->
|
threadFromNode: (node) ->
|
||||||
Get.threadFromRoot $.x 'ancestor::div[@class="thread"]', node
|
Get.threadFromRoot $.x 'ancestor::div[@class="thread"]', node
|
||||||
postFromRoot: (root) ->
|
postFromRoot: (root) ->
|
||||||
|
return null unless root?
|
||||||
link = $ '.postNum > a[href*="#"]', root
|
link = $ '.postNum > a[href*="#"]', root
|
||||||
boardID = link.pathname.split(/\/+/)[1]
|
boardID = link.pathname.split(/\/+/)[1]
|
||||||
postID = link.hash[2..]
|
postID = link.hash[2..]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user