mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-16 19:48:10 +01:00
Ignore more script injection errors
This commit is contained in:
parent
7467395c33
commit
8340ccf8da
1 changed files with 6 additions and 1 deletions
|
@ -56,6 +56,11 @@
|
|||
tags:
|
||||
mode: if @DOC then 'single' else 'full'
|
||||
iframe: (window.top isnt window).toString()
|
||||
shouldSendCallback: ->
|
||||
if @isInjectionError()
|
||||
@onInjectionError()
|
||||
return false
|
||||
true
|
||||
dataCallback: (data) ->
|
||||
try
|
||||
$.extend(data.user ||= {}, app.settings.settings)
|
||||
|
@ -215,7 +220,7 @@
|
|||
isInjectionError: ->
|
||||
# Some browser extensions expect the entire web to use jQuery.
|
||||
# I gave up trying to fight back.
|
||||
window.$ isnt app._$ or window.$$ isnt app._$$ or window.page isnt app._page
|
||||
window.$ isnt app._$ or window.$$ isnt app._$$ or window.page isnt app._page or typeof $.empty isnt 'function' or typeof page.show isnt 'function'
|
||||
|
||||
isAppError: (error, file) ->
|
||||
# Ignore errors from external scripts.
|
||||
|
|
Loading…
Reference in a new issue