From 40e6ff1b64e4847b275e1ca5cdce212cf0d0f0c3 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Mon, 14 Jan 2019 12:11:58 -0700 Subject: [PATCH] Alert users when their WebView is too old to work properly. --- www/js/platform.js | 6 ++++++ www/pages/editor.html | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/www/js/platform.js b/www/js/platform.js index 99b2bd1..d188a42 100644 --- a/www/js/platform.js +++ b/www/js/platform.js @@ -13,6 +13,12 @@ var openBrowser = function (url) { function initCordova() { platform_type = "cordova"; + try { + eval('"use strict"; class foo {}'); + } catch (e) { + alert("Your device's webview is out of date and won't work with this app. Please update it."); + } + // Handle back button to close things document.addEventListener("backbutton", function (event) { router.navigate("/home"); diff --git a/www/pages/editor.html b/www/pages/editor.html index b8e3cb8..f4b33ab 100644 --- a/www/pages/editor.html +++ b/www/pages/editor.html @@ -31,6 +31,10 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. background-color: white; border: none; border-radius: 0px; + /* Following lines are from Framework7 .elevation-2 */ + -webkit-box-shadow: 0px 3px 1px -2px rgba(0,0,0,.2),0px 2px 2px 0px rgba(0,0,0,.14),0px 1px 5px 0px rgba(0,0,0,.12); + box-shadow: 0px 3px 1px -2px rgba(0,0,0,.2),0px 2px 2px 0px rgba(0,0,0,.14),0px 1px 5px 0px rgba(0,0,0,.12); + /* end Framework7 code */ }