Fix offline Q&A when running as firefox app

Fixes #173.
pull/185/head
Thibaut 10 years ago
parent aa3de225aa
commit f100f01ae3

@ -87,6 +87,7 @@
@hideLoading() @hideLoading()
@welcomeBack() unless @doc @welcomeBack() unless @doc
@removeEvent 'ready bootError' @removeEvent 'ready bootError'
navigator.mozApps?.getSelf().onsuccess = -> app.mozApp = true
return return
initDoc: (doc) -> initDoc: (doc) ->

@ -43,6 +43,8 @@ canICloseTheTab = ->
if app.AppCache.isEnabled() if app.AppCache.isEnabled()
""" Yes! Even offline, you can open a new tab, go to <a href="http://devdocs.io">devdocs.io</a>, and everything will work as if you were online (provided you installed all the documentations you want to use beforehand).<br> """ Yes! Even offline, you can open a new tab, go to <a href="http://devdocs.io">devdocs.io</a>, and everything will work as if you were online (provided you installed all the documentations you want to use beforehand).<br>
Note that loading any page other than <a href="http://devdocs.io">devdocs.io</a> directly won't work (due to limitations in AppCache). """ Note that loading any page other than <a href="http://devdocs.io">devdocs.io</a> directly won't work (due to limitations in AppCache). """
else if app.mozApp
""" Yes! Even offline, you can open the app and everything will work as if you were online (provided you installed all the documentations you want to use beforehand). """
else else
""" No. AppCache isn't available in your browser (or is disabled) so loading <a href="http://devdocs.io">devdocs.io</a> offline won't work.<br> """ No. AppCache isn't available in your browser (or is disabled) so loading <a href="http://devdocs.io">devdocs.io</a> offline won't work.<br>
The current tab will continue to work, though (provided you installed all the documentations you want to use beforehand). """ The current tab will continue to work, though (provided you installed all the documentations you want to use beforehand). """

Loading…
Cancel
Save