diff --git a/4chan_x.user.js b/4chan_x.user.js index 4289cfe40..b87a5158a 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3318,7 +3318,7 @@ } }, cleanPost: function(root) { - var child, el, now, post, _i, _j, _len, _len1, _ref, _ref1; + var child, el, inline, inlined, now, post, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref, _ref1, _ref2, _ref3; post = $('.post', root); _ref = Array.prototype.slice.call(root.childNodes); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -3327,10 +3327,20 @@ $.rm(child); } } - now = Date.now(); - _ref1 = $$('[id]', root); + _ref1 = $$('.inline', post); for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { - el = _ref1[_j]; + inline = _ref1[_j]; + $.rm(inline); + } + _ref2 = $$('.inlined', post); + for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) { + inlined = _ref2[_k]; + $.rmClass(inlined, 'inlined'); + } + now = Date.now(); + _ref3 = $$('[id]', root); + for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) { + el = _ref3[_l]; el.id = "" + now + "_" + el.id; } $.rmClass(root, 'forwarded'); diff --git a/script.coffee b/script.coffee index ea61bfd78..1011edb75 100644 --- a/script.coffee +++ b/script.coffee @@ -2606,6 +2606,12 @@ Get = for child in Array::slice.call root.childNodes $.rm child unless child is post + # Remove inlined posts inside of this post. + for inline in $$ '.inline', post + $.rm inline + for inlined in $$ '.inlined', post + $.rmClass inlined, 'inlined' + # Don't mess with other features now = Date.now() for el in $$ '[id]', root