From 27167a49a6c6183a670026335abb28cff473e37a Mon Sep 17 00:00:00 2001 From: Jasper van Merle Date: Wed, 10 Jul 2019 21:15:42 +0200 Subject: [PATCH] Update offline page --- assets/javascripts/app/config.coffee.erb | 2 +- assets/javascripts/templates/pages/offline_tmpl.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/javascripts/app/config.coffee.erb b/assets/javascripts/app/config.coffee.erb index 9b28b5a5..dc37feab 100644 --- a/assets/javascripts/app/config.coffee.erb +++ b/assets/javascripts/app/config.coffee.erb @@ -14,4 +14,4 @@ app.config = release: <%= Time.now.utc.httpdate.to_json %> mathml_stylesheet: '<%= App.cdn_origin %>/mathml.css' service_worker_path: '/service-worker.js' - service_worker_enabled: <%= App.environment == 'production' || !ENV["ENABLE_SERVICE_WORKER"].nil? %> + service_worker_enabled: <%= App.environment == 'production' || ENV["ENABLE_SERVICE_WORKER"] == 'true' %> diff --git a/assets/javascripts/templates/pages/offline_tmpl.coffee b/assets/javascripts/templates/pages/offline_tmpl.coffee index 52f64839..e8b262aa 100644 --- a/assets/javascripts/templates/pages/offline_tmpl.coffee +++ b/assets/javascripts/templates/pages/offline_tmpl.coffee @@ -47,7 +47,7 @@ canICloseTheTab = -> reason = "aren't available in your browser (or are disabled)" if app.config.env != 'production' - reason = "are disabled in your development instance of DevDocs (enable them by setting the ENABLE_SERVICE_WORKERS environment variable)" + reason = "are disabled in your development instance of DevDocs (enable them by setting the ENABLE_SERVICE_WORKERS environment variable to true)" """ No. Service Workers #{reason}, so loading devdocs.io offline won't work.
The current tab will continue to function even when you go offline (provided you installed all the documentations beforehand). """