Revert "Remove Report.coffee for now."

This reverts commit 7b09a3f8f244740e6a4ff19223732338d912c298.

Conflicts:
	src/General/Main.coffee
This commit is contained in:
ccd0 2015-04-14 21:01:54 -07:00
parent 964128b211
commit 5291ff87d1
2 changed files with 9 additions and 0 deletions

View File

@ -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'

View File

@ -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