From 5291ff87d13dddf392c97ed789050a35525bd40d Mon Sep 17 00:00:00 2001 From: ccd0 Date: Tue, 14 Apr 2015 21:01:54 -0700 Subject: [PATCH] Revert "Remove Report.coffee for now." This reverts commit 7b09a3f8f244740e6a4ff19223732338d912c298. Conflicts: src/General/Main.coffee --- src/General/Main.coffee | 1 + src/Miscellaneous/Report.coffee | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100755 src/Miscellaneous/Report.coffee diff --git a/src/General/Main.coffee b/src/General/Main.coffee index 295f84625..727fe80f5 100755 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -56,6 +56,7 @@ Main = when 'a.4cdn.org' return when 'sys.4chan.org' + Report.init() PostSuccessful.init() if g.VIEW is 'post' return when 'i.4cdn.org' diff --git a/src/Miscellaneous/Report.coffee b/src/Miscellaneous/Report.coffee new file mode 100755 index 000000000..0aaeb2c41 --- /dev/null +++ b/src/Miscellaneous/Report.coffee @@ -0,0 +1,8 @@ +Report = + init: -> + return unless /report/.test(location.search) + $.asap (-> $.id 'recaptcha_response_field'), Report.ready + ready: -> + field = $.id 'recaptcha_response_field' + $.on field, 'keydown', (e) -> + $.globalEval 'Recaptcha.reload()' if e.keyCode is 8 and not field.value