This commit is contained in:
James Campos 2012-06-12 10:32:27 -07:00
parent 82743a39dc
commit c47e058e7c
2 changed files with 6 additions and 6 deletions

View File

@ -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')) {

View File

@ -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!