History

Improve IDB error handling for Firefox private mode

Thibaut Courouble committed 9 years ago

Commit 8b566f21 parent dcca46c2 files · +5 −0Browse files

Unified · Split

2 files
  1. assets/javascripts/app/db.coffee +2 −0
  2. assets/javascripts/templates/error_tmpl.coffee +3 −0
assets/javascripts/app/db.coffee+2−0
@@ -49,6 +49,8 @@ class app.DB · 48 unmodified lines
4949 @onQuotaExceededError()
5050 when 'VersionError'
5151 @onVersionError()
52+ when 'InvalidStateError'
53+ @fail 'private_mode'
5254 else
5355 @fail 'cant_open', error
5456 return
assets/javascripts/templates/error_tmpl.coffee+3−0
@@ -33,6 +33,9 @@ app.templates.offlineError = (reason, exception) -> · 32 unmodified lines
3333 when 'buggy'
3434 """ DevDocs requires IndexedDB to cache documentations for offline access.<br>
3535 Unfortunately your browser's implementation of IndexedDB contains bugs that prevent DevDocs from using it. """
36+ when 'private_mode'
37+ """ Your browser appears to be running in private mode.<br>
38+ This prevents DevDocs from caching documentations for offline access."""
3639 when 'exception'
3740 """ An error occured when trying to open the IndexedDB database:<br>
3841 <code class="_label">#{exception.name}: #{exception.message}</code> """

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t