"Deleting..." -> "[ Deleting... ]"
This commit is contained in:
parent
88a282d73b
commit
428d3fe1ff
@ -3451,9 +3451,9 @@
|
|||||||
return $.on(a, 'click', DeleteButton["delete"]);
|
return $.on(a, 'click', DeleteButton["delete"]);
|
||||||
},
|
},
|
||||||
"delete": function() {
|
"delete": function() {
|
||||||
var board, form, id, m, o, pwd, self;
|
var board, form, id, m, pwd, self;
|
||||||
$.off(this, 'click', DeleteButton["delete"]);
|
$.off(this, 'click', DeleteButton["delete"]);
|
||||||
this.textContent = 'Deleting...';
|
this.innerHTML = '[ Deleting... ]';
|
||||||
if (m = d.cookie.match(/4chan_pass=([^;]+)/)) {
|
if (m = d.cookie.match(/4chan_pass=([^;]+)/)) {
|
||||||
pwd = decodeURIComponent(m[1]);
|
pwd = decodeURIComponent(m[1]);
|
||||||
} else {
|
} else {
|
||||||
@ -3462,12 +3462,11 @@
|
|||||||
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;
|
||||||
o = {
|
form = {
|
||||||
mode: 'usrdel',
|
mode: 'usrdel',
|
||||||
pwd: pwd
|
pwd: pwd
|
||||||
};
|
};
|
||||||
o[id] = 'delete';
|
form[id] = 'delete';
|
||||||
form = $.formData(o);
|
|
||||||
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);
|
||||||
@ -3476,7 +3475,7 @@
|
|||||||
return DeleteButton.error(self);
|
return DeleteButton.error(self);
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
form: form
|
form: $.formData(form)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
load: function(self, html) {
|
load: function(self, html) {
|
||||||
|
|||||||
@ -2630,7 +2630,7 @@ DeleteButton =
|
|||||||
$.on a, 'click', DeleteButton.delete
|
$.on a, 'click', DeleteButton.delete
|
||||||
delete: ->
|
delete: ->
|
||||||
$.off @, 'click', DeleteButton.delete
|
$.off @, 'click', DeleteButton.delete
|
||||||
@textContent = 'Deleting...'
|
@innerHTML = '[ Deleting... ]'
|
||||||
|
|
||||||
if m = d.cookie.match /4chan_pass=([^;]+)/
|
if m = d.cookie.match /4chan_pass=([^;]+)/
|
||||||
pwd = decodeURIComponent m[1]
|
pwd = decodeURIComponent m[1]
|
||||||
@ -2640,17 +2640,16 @@ 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
|
||||||
|
|
||||||
o =
|
form =
|
||||||
mode: 'usrdel'
|
mode: 'usrdel'
|
||||||
pwd: pwd
|
pwd: pwd
|
||||||
o[id] = 'delete'
|
form[id] = 'delete'
|
||||||
form = $.formData o
|
|
||||||
|
|
||||||
$.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
|
||||||
}, {
|
}, {
|
||||||
form: form
|
form: $.formData form
|
||||||
}
|
}
|
||||||
|
|
||||||
load: (self, html) ->
|
load: (self, html) ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user