data -> form
This commit is contained in:
parent
e18120acd2
commit
d7781ec3fd
@ -3435,7 +3435,7 @@
|
|||||||
return $.on(a, 'click', DeleteButton["delete"]);
|
return $.on(a, 'click', DeleteButton["delete"]);
|
||||||
},
|
},
|
||||||
"delete": function() {
|
"delete": function() {
|
||||||
var board, data, id, m, pwd, self;
|
var board, form, id, m, pwd, self;
|
||||||
$.off(this, 'click', DeleteButton["delete"]);
|
$.off(this, 'click', DeleteButton["delete"]);
|
||||||
this.textContent = 'Deleting...';
|
this.textContent = 'Deleting...';
|
||||||
if (m = d.cookie.match(/4chan_pass=([^;]+)/)) {
|
if (m = d.cookie.match(/4chan_pass=([^;]+)/)) {
|
||||||
@ -3446,10 +3446,10 @@
|
|||||||
id = $.x('preceding-sibling::input', this).name;
|
id = $.x('preceding-sibling::input', this).name;
|
||||||
board = $.x('preceding-sibling::span[1]/a', this).pathname.match(/\w+/)[0];
|
board = $.x('preceding-sibling::span[1]/a', this).pathname.match(/\w+/)[0];
|
||||||
self = this;
|
self = this;
|
||||||
data = new FormData();
|
form = new FormData();
|
||||||
data.append(id, 'delete');
|
form.append(id, 'delete');
|
||||||
data.append('mode', 'usrdel');
|
form.append('mode', 'usrdel');
|
||||||
data.append('pwd', pwd);
|
form.append('pwd', pwd);
|
||||||
return $.ajax("https://sys.4chan.org/" + board + "/imgboard.php", {
|
return $.ajax("https://sys.4chan.org/" + board + "/imgboard.php", {
|
||||||
onload: function() {
|
onload: function() {
|
||||||
return DeleteButton.load(self, this.response);
|
return DeleteButton.load(self, this.response);
|
||||||
@ -3459,7 +3459,7 @@
|
|||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
type: 'post',
|
type: 'post',
|
||||||
form: data
|
form: form
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
load: function(self, html) {
|
load: function(self, html) {
|
||||||
|
|||||||
@ -2630,17 +2630,17 @@ DeleteButton =
|
|||||||
board = $.x('preceding-sibling::span[1]/a', @).pathname.match(/\w+/)[0]
|
board = $.x('preceding-sibling::span[1]/a', @).pathname.match(/\w+/)[0]
|
||||||
self = this
|
self = this
|
||||||
|
|
||||||
data = new FormData()
|
form = new FormData()
|
||||||
data.append id, 'delete'
|
form.append id, 'delete'
|
||||||
data.append 'mode', 'usrdel'
|
form.append 'mode', 'usrdel'
|
||||||
data.append 'pwd', pwd
|
form.append 'pwd', pwd
|
||||||
|
|
||||||
$.ajax "https://sys.4chan.org/#{board}/imgboard.php", {
|
$.ajax "https://sys.4chan.org/#{board}/imgboard.php", {
|
||||||
onload: -> DeleteButton.load self, @response
|
onload: -> DeleteButton.load self, @response
|
||||||
onerror: -> DeleteButton.error self
|
onerror: -> DeleteButton.error self
|
||||||
}, {
|
}, {
|
||||||
type: 'post'
|
type: 'post'
|
||||||
form: data
|
form: form
|
||||||
}
|
}
|
||||||
|
|
||||||
load: (self, html) ->
|
load: (self, html) ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user