           tags:
             mode: if @isSingleDoc() then 'single' else 'full'
             iframe: (window.top isnt window).toString()
-          shouldSendCallback: => not @isAndroidWebview()
+          shouldSendCallback: =>
+            try
+              if @isInjectionError()
+                @onInjectionError()
+                return false
+              if @isAndroidWebview()
+                return false
+            true
           dataCallback: (data) ->
             try
               $.extend(data.user ||= {}, app.settings.dump())

    Raven.captureMessage 'QuotaExceededError', level: 'warning'

  onWindowError: (args...) ->
    return unless @isAppError args...
    @previousErrorHandler? args...
    @hideLoading()
    @errorNotif or= new app.views.Notif 'Error'
    @errorNotif.show()
    return

  isAppError: (error, file) ->
    # Ignore errors from external scripts.

@app =
  _$: $
  _$$: $$
  _page: page
  collections: {}
  models:      {}
  templates:   {}
