diff --git a/assets/javascripts/app/app.coffee b/assets/javascripts/app/app.coffee index 85c5ec5f..ddb1559a 100644 --- a/assets/javascripts/app/app.coffee +++ b/assets/javascripts/app/app.coffee @@ -245,6 +245,9 @@ isMobile: -> @_isMobile ?= app.views.Mobile.detect() + isAndroidWebview: -> + @_isAndroidWebview ?= app.views.Mobile.detectAndroidWebview() + isInvalidLocation: -> @config.env is 'production' and location.host.indexOf(app.config.production_host) isnt 0 diff --git a/assets/javascripts/templates/pages/root_tmpl.coffee.erb b/assets/javascripts/templates/pages/root_tmpl.coffee.erb index 514f217e..87068f67 100644 --- a/assets/javascripts/templates/pages/root_tmpl.coffee.erb +++ b/assets/javascripts/templates/pages/root_tmpl.coffee.erb @@ -73,3 +73,12 @@ app.templates.mobileIntro = """ Stop showing this message """ + +app.templates.androidWarning = """ +
DevDocs is running inside an Android WebView. Some features may not work properly. +
If you downloaded an app called DevDocs on the Play Store, please uninstall it — it's made by someone who is using (and profiting from) the name DevDocs without permission. +
To install DevDocs on your phone, visit devdocs.io in Chrome and select "Add to home screen" in the menu. +