diff --git a/src/General/Get.coffee b/src/General/Get.coffee index f87a17342..aff510085 100644 --- a/src/General/Get.coffee +++ b/src/General/Get.coffee @@ -13,11 +13,8 @@ Get = Get.threadFromRoot $.x 'ancestor::div[@class="thread"]', node postFromRoot: (root) -> return null unless root? - link = $ '.postNum > a[href*="#"]', root - boardID = link.pathname.split(/\/+/)[1] - postID = link.hash[2..] - index = root.dataset.clone - post = g.posts["#{boardID}.#{postID}"] + post = g.posts[root.dataset.fullID] + 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 diff --git a/src/classes/Post.coffee b/src/classes/Post.coffee index a960b3e8e..7fd84a844 100644 --- a/src/classes/Post.coffee +++ b/src/classes/Post.coffee @@ -30,6 +30,7 @@ class Post @fullID = "#{@board}.#{@ID}" @context = @ + root.dataset.fullID = @fullID post = $ '.post', root info = $ '.postInfo', post @nodes =