work on cross quote, shuffle
This commit is contained in:
parent
b0e0014154
commit
bd5616ebdb
@ -3435,22 +3435,22 @@
|
|||||||
return $.on(a, 'click', DeleteButton["delete"]);
|
return $.on(a, 'click', DeleteButton["delete"]);
|
||||||
},
|
},
|
||||||
"delete": function() {
|
"delete": function() {
|
||||||
var data, id, m, pwd, self;
|
var board, data, id, m, pwd, self;
|
||||||
|
$.off(this, 'click', DeleteButton["delete"]);
|
||||||
|
this.textContent = '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 {
|
||||||
this.textContent = 'Error: no password found';
|
pwd = $.id('delPassword').value;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
$.off(this, 'click', DeleteButton["delete"]);
|
|
||||||
this.textContent = 'Deleting...';
|
|
||||||
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];
|
||||||
|
self = this;
|
||||||
data = new FormData();
|
data = new FormData();
|
||||||
data.append(id, 'delete');
|
data.append(id, 'delete');
|
||||||
data.append('mode', 'usrdel');
|
data.append('mode', 'usrdel');
|
||||||
data.append('pwd', pwd);
|
data.append('pwd', pwd);
|
||||||
self = this;
|
return $.ajax("https://sys.4chan.org/" + board + "/imgboard.php", {
|
||||||
return $.ajax("https://sys.4chan.org/" + g.BOARD + "/imgboard.php", {
|
|
||||||
onload: function() {
|
onload: function() {
|
||||||
return DeleteButton.load(self, this.response);
|
return DeleteButton.load(self, this.response);
|
||||||
},
|
},
|
||||||
|
|||||||
@ -2619,28 +2619,30 @@ DeleteButton =
|
|||||||
$.add $('.postInfo', post.el), a
|
$.add $('.postInfo', post.el), a
|
||||||
$.on a, 'click', DeleteButton.delete
|
$.on a, 'click', DeleteButton.delete
|
||||||
delete: ->
|
delete: ->
|
||||||
if m = d.cookie.match(/4chan_pass=([^;]+)/)
|
|
||||||
pwd = decodeURIComponent m[1]
|
|
||||||
else
|
|
||||||
@textContent = 'Error: no password found'
|
|
||||||
return
|
|
||||||
|
|
||||||
$.off @, 'click', DeleteButton.delete
|
$.off @, 'click', DeleteButton.delete
|
||||||
@textContent = 'Deleting...'
|
@textContent = 'Deleting...'
|
||||||
|
|
||||||
|
if m = d.cookie.match(/4chan_pass=([^;]+)/)
|
||||||
|
pwd = decodeURIComponent m[1]
|
||||||
|
else
|
||||||
|
pwd = $.id('delPassword').value
|
||||||
id = $.x('preceding-sibling::input', @).name
|
id = $.x('preceding-sibling::input', @).name
|
||||||
|
board = $.x('preceding-sibling::span[1]/a', @).pathname.match(/\w+/)[0]
|
||||||
|
self = this
|
||||||
|
|
||||||
data = new FormData()
|
data = new FormData()
|
||||||
data.append id, 'delete'
|
data.append id, 'delete'
|
||||||
data.append 'mode', 'usrdel'
|
data.append 'mode', 'usrdel'
|
||||||
data.append 'pwd', pwd
|
data.append 'pwd', pwd
|
||||||
self = this
|
|
||||||
$.ajax "https://sys.4chan.org/#{g.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: data
|
||||||
}
|
}
|
||||||
|
|
||||||
load: (self, html) ->
|
load: (self, html) ->
|
||||||
doc = d.implementation.createHTMLDocument ''
|
doc = d.implementation.createHTMLDocument ''
|
||||||
doc.documentElement.innerHTML = html
|
doc.documentElement.innerHTML = html
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user