diff --git a/4chan_x.user.js b/4chan_x.user.js index 7e19a717f..5103cfc38 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -778,7 +778,7 @@ } doc = d.implementation.createHTMLDocument(''); doc.documentElement.innerHTML = req.response; - node = d.importNode(doc.getElementById("m" + replyID)); + node = d.importNode(doc.getElementById("m" + replyID), true); quotes = node.getElementsByClassName('quotelink'); for (_i = 0, _len = quotes.length; _i < _len; _i++) { quote = quotes[_i]; @@ -890,7 +890,7 @@ _ref = $$('.replyContainer', doc); for (_i = 0, _len = _ref.length; _i < _len; _i++) { reply = _ref[_i]; - reply = d.importNode(reply); + reply = d.importNode(reply, true); _ref1 = $$('.quotelink', reply); for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { quote = _ref1[_j]; diff --git a/script.coffee b/script.coffee index 6f036f860..b21a26179 100644 --- a/script.coffee +++ b/script.coffee @@ -619,7 +619,7 @@ ExpandComment = # Import the node to fix quote.hashes # as they're empty when in a different document. - node = d.importNode doc.getElementById "m#{replyID}" + node = d.importNode doc.getElementById("m#{replyID}"), true quotes = node.getElementsByClassName 'quotelink' for quote in quotes @@ -697,7 +697,7 @@ ExpandThread = threadID = thread.id[1..] nodes = [] for reply in $$ '.replyContainer', doc - reply = d.importNode reply + reply = d.importNode reply, true for quote in $$ '.quotelink', reply href = quote.getAttribute 'href' continue if href[0] is '/' # Cross-board quote