diff --git a/4chan_x.user.js b/4chan_x.user.js index c86f4015b..f0d6308e4 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3344,7 +3344,7 @@ node: function(post) { var board, className, data, href, i, id, index, m, node, nodes, quote, quotes, snapshot, text, _i, _len, _ref; if (post["class"] === 'inline') return; - snapshot = d.evaluate('.//text()[not(ancestor::a)]', post.el.lastChild, null, 6, null); + snapshot = d.evaluate('.//text()[not(parent::a)]', post.el.lastChild, null, 6, null); for (i = 0, _ref = snapshot.snapshotLength; 0 <= _ref ? i < _ref : i > _ref; 0 <= _ref ? i++ : i--) { node = snapshot.snapshotItem(i); data = node.data; diff --git a/script.coffee b/script.coffee index 06c7c0ae8..3cbdc849a 100644 --- a/script.coffee +++ b/script.coffee @@ -2780,7 +2780,7 @@ Quotify = # XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE is 6 # Get all the text nodes that are not inside an anchor. - snapshot = d.evaluate './/text()[not(ancestor::a)]', post.el.lastChild, null, 6, null + snapshot = d.evaluate './/text()[not(parent::a)]', post.el.lastChild, null, 6, null for i in [0...snapshot.snapshotLength] node = snapshot.snapshotItem i