diff --git a/4chan_x.user.js b/4chan_x.user.js index acd016ecf..25a89f79e 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3452,7 +3452,7 @@ self = this; return $.ajax("https://sys.4chan.org/" + g.BOARD + "/imgboard.php", { onload: function() { - return DeleteButton.load(self); + return DeleteButton.load(self, this.response); }, onerror: function() { return DeleteButton.error(self); @@ -3462,10 +3462,10 @@ form: data }); }, - load: function(self) { + load: function(self, html) { var doc, msg, tc; doc = d.implementation.createHTMLDocument(''); - doc.documentElement.innerHTML = this.response; + doc.documentElement.innerHTML = html; if (doc.title === '4chan - Banned') { tc = 'Banned!'; } else if (msg = doc.getElementById('errmsg')) { diff --git a/script.coffee b/script.coffee index 9b2cd4d7e..98767c132 100644 --- a/script.coffee +++ b/script.coffee @@ -2635,15 +2635,15 @@ DeleteButton = data.append 'pwd', pwd self = this $.ajax "https://sys.4chan.org/#{g.BOARD}/imgboard.php", { - onload: -> DeleteButton.load self + onload: -> DeleteButton.load self, @response onerror: -> DeleteButton.error self }, { type: 'post' form: data } - load: (self) -> + load: (self, html) -> doc = d.implementation.createHTMLDocument '' - doc.documentElement.innerHTML = @response + doc.documentElement.innerHTML = html if doc.title is '4chan - Banned' # Ban/warn check tc = 'Banned!' else if msg = doc.getElementById 'errmsg' # error!