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