diff --git a/4chan_x.js b/4chan_x.js index 74639f61b..3a9f556c9 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -1745,10 +1745,10 @@ }, toggle: function(e) { var el, id, inline, req, root, table, threadID; - e.preventDefault(); if (!(id = this.hash.slice(1))) { return; } + e.preventDefault(); root = $.x('ancestor::td[1]', this); if (table = $("#i" + id, root)) { $.rm(table); diff --git a/script.coffee b/script.coffee index 3624752b3..171a84e90 100644 --- a/script.coffee +++ b/script.coffee @@ -1397,8 +1397,8 @@ quoteInline = quote.removeAttribute 'onclick' $.bind quote, 'click', quoteInline.toggle toggle: (e) -> - e.preventDefault() return unless id = @hash[1..] + e.preventDefault() root = $.x 'ancestor::td[1]', @ if table = $ "#i#{id}", root $.rm table