From 428d3fe1ffcdd4ced3300d378879863e9e9ba978 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Thu, 14 Jun 2012 13:44:03 +0200 Subject: [PATCH] "Deleting..." -> "[ Deleting... ]" --- 4chan_x.user.js | 11 +++++------ script.coffee | 9 ++++----- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index d7eda27f8..a90efaf85 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3451,9 +3451,9 @@ return $.on(a, 'click', DeleteButton["delete"]); }, "delete": function() { - var board, form, id, m, o, pwd, self; + var board, form, id, m, pwd, self; $.off(this, 'click', DeleteButton["delete"]); - this.textContent = 'Deleting...'; + this.innerHTML = '[ Deleting... ]'; if (m = d.cookie.match(/4chan_pass=([^;]+)/)) { pwd = decodeURIComponent(m[1]); } else { @@ -3462,12 +3462,11 @@ id = $.x('preceding-sibling::input', this).name; board = $.x('preceding-sibling::span[1]/a', this).pathname.match(/\w+/)[0]; self = this; - o = { + form = { mode: 'usrdel', pwd: pwd }; - o[id] = 'delete'; - form = $.formData(o); + form[id] = 'delete'; return $.ajax("https://sys.4chan.org/" + board + "/imgboard.php", { onload: function() { return DeleteButton.load(self, this.response); @@ -3476,7 +3475,7 @@ return DeleteButton.error(self); } }, { - form: form + form: $.formData(form) }); }, load: function(self, html) { diff --git a/script.coffee b/script.coffee index 96f4aee3e..8de6a1cf0 100644 --- a/script.coffee +++ b/script.coffee @@ -2630,7 +2630,7 @@ DeleteButton = $.on a, 'click', DeleteButton.delete delete: -> $.off @, 'click', DeleteButton.delete - @textContent = 'Deleting...' + @innerHTML = '[ Deleting... ]' if m = d.cookie.match /4chan_pass=([^;]+)/ pwd = decodeURIComponent m[1] @@ -2640,17 +2640,16 @@ DeleteButton = board = $.x('preceding-sibling::span[1]/a', @).pathname.match(/\w+/)[0] self = this - o = + form = mode: 'usrdel' pwd: pwd - o[id] = 'delete' - form = $.formData o + form[id] = 'delete' $.ajax "https://sys.4chan.org/#{board}/imgboard.php", { onload: -> DeleteButton.load self, @response onerror: -> DeleteButton.error self }, { - form: form + form: $.formData form } load: (self, html) ->