From dc19a799a7af4671bfbae82e5e174403d4ad6415 Mon Sep 17 00:00:00 2001 From: James Campos Date: Wed, 21 Sep 2011 20:06:41 -0700 Subject: [PATCH] stats on file removal --- 4chan_x.user.js | 8 +++++--- script.coffee | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 1cbfe38b7..620aabdf1 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1266,13 +1266,15 @@ $.bind($('img', box), 'click', function() { return this.previousSibling.click(); }); - $.bind($('.x', box), 'click', function() { - return $.rm(this.parentNode); - }); + $.bind($('.x', box), 'click', QR.rmThumb); $.add(files, box); file.click(); return QR.stats(); }, + rmThumb: function() { + $.rm(this.parentNode); + return QR.stats(); + }, captchaNode: function(e) { QR.captcha = { challenge: e.target.value, diff --git a/script.coffee b/script.coffee index ffcba0909..15477a425 100644 --- a/script.coffee +++ b/script.coffee @@ -977,10 +977,13 @@ QR = file = $ 'input', box $.bind file, 'change', QR.change $.bind $('img', box), 'click', -> @previousSibling.click() - $.bind $('.x', box), 'click', -> $.rm @parentNode + $.bind $('.x', box), 'click', QR.rmThumb $.add files, box file.click() QR.stats() + rmThumb: -> + $.rm @parentNode + QR.stats() captchaNode: (e) -> QR.captcha = challenge: e.target.value