History

Ignore more script injection errors

Thibaut Courouble committed 10 years ago

Commit 8340ccf1 parent 74673951 file · +6 −1Browse files

Unified · Split

assets/javascripts/app/app.coffee+6−1
@@ -56,6 +56,11 @@ · 55 unmodified lines
56 tags:56 tags:
57 mode: if @DOC then 'single' else 'full'57 mode: if @DOC then 'single' else 'full'
58 iframe: (window.top isnt window).toString()58 iframe: (window.top isnt window).toString()
59 shouldSendCallback: ->
60 if @isInjectionError()
61 @onInjectionError()
62 return false
63 true
59 dataCallback: (data) ->64 dataCallback: (data) ->
60 try65 try
61 $.extend(data.user ||= {}, app.settings.settings)66 $.extend(data.user ||= {}, app.settings.settings)
@@ -215,7 +220,7 @@ · 153 unmodified lines
215 isInjectionError: ->220 isInjectionError: ->
216 # Some browser extensions expect the entire web to use jQuery.221 # Some browser extensions expect the entire web to use jQuery.
217 # I gave up trying to fight back.222 # I gave up trying to fight back.
218 window.$ isnt app._$ or window.$$ isnt app._$$ or window.page isnt app._page223 window.$ isnt app._$ or window.$$ isnt app._$$ or window.page isnt app._page or typeof $.empty isnt 'function' or typeof page.show isnt 'function'
219 224
220 isAppError: (error, file) ->225 isAppError: (error, file) ->
221 # Ignore errors from external scripts.226 # Ignore errors from external scripts.