Simplify Get.postFromNode.

The extra stuff was added in ee291bad0ce37f990416f596b75d40812c84e32f
to make thread stub menus work and is no longer needed.
This commit is contained in:
ccd0 2016-10-30 22:59:53 -07:00
parent aa7a35307a
commit a43de316c8

View File

@ -18,7 +18,7 @@ Get =
index = root.dataset.clone
if index then post.clones[index] else post
postFromNode: (root) ->
Get.postFromRoot $.x '(ancestor::div[contains(@class,"postContainer")][1]|following::div[contains(@class,"postContainer")][1])', root
Get.postFromRoot $.x 'ancestor::div[contains(@class,"postContainer")][1]', root
postDataFromLink: (link) ->
if link.hostname is 'boards.4chan.org'
path = link.pathname.split /\/+/