mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Disable offline access if application cache is not available, rather than failing. Apparently the next version of Firefox will disable app cache on HTTP sites. See https://bugs.launchpad.net/calibre/+bug/1737642
This commit is contained in:
parent
1f2db06610
commit
d703d0ec56
@ -46,9 +46,12 @@ else:
|
||||
print('WARNING: failed to swap applicationCache')
|
||||
console.log(e)
|
||||
|
||||
if window.applicationCache:
|
||||
window.applicationCache.addEventListener('updateready', on_appcache_ready)
|
||||
if window.applicationCache.status is window.applicationCache.UPDATEREADY:
|
||||
on_appcache_ready()
|
||||
else:
|
||||
console.warn("Your browser does not have a working Application Cache, offline access will not work")
|
||||
script = document.currentScript or document.scripts[0]
|
||||
main_js(script.textContent)
|
||||
script.parentNode.removeChild(script) # save some memory
|
||||
|
Loading…
x
Reference in New Issue
Block a user