diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index cf4d6addc..2f997141e 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1995,7 +1995,7 @@ } }, postFromNode: function(root) { - return Get.postFromRoot($.x('(ancestor::div[contains(@class,"postContainer")]|following::div[contains(@class,"postContainer")])', root)); + return Get.postFromRoot($.x('(ancestor::div[contains(@class,"postContainer")]|following::div[contains(@class,"postContainer")])[1]', root)); }, contextFromNode: function(quotelink) { return Get.postFromRoot($.x('ancestor::div[parent::div[@class="thread"]][1]', quotelink)); diff --git a/builds/crx/script.js b/builds/crx/script.js index 1e575d241..787755dde 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -2007,7 +2007,7 @@ } }, postFromNode: function(root) { - return Get.postFromRoot($.x('(ancestor::div[contains(@class,"postContainer")]|following::div[contains(@class,"postContainer")])', root)); + return Get.postFromRoot($.x('(ancestor::div[contains(@class,"postContainer")]|following::div[contains(@class,"postContainer")])[1]', root)); }, contextFromNode: function(quotelink) { return Get.postFromRoot($.x('ancestor::div[parent::div[@class="thread"]][1]', quotelink)); diff --git a/src/General/Get.coffee b/src/General/Get.coffee index 6b9d94e86..bedb80bd6 100644 --- a/src/General/Get.coffee +++ b/src/General/Get.coffee @@ -18,7 +18,7 @@ Get = post = g.posts["#{boardID}.#{postID}"] if index then post.clones[index] else post postFromNode: (root) -> - Get.postFromRoot $.x '(ancestor::div[contains(@class,"postContainer")]|following::div[contains(@class,"postContainer")])', root + Get.postFromRoot $.x '(ancestor::div[contains(@class,"postContainer")]|following::div[contains(@class,"postContainer")])[1]', root contextFromNode: (quotelink) -> Get.postFromRoot $.x 'ancestor::div[parent::div[@class="thread"]][1]', quotelink postDataFromLink: (link) ->