diff --git a/www/js/platform.js b/www/js/platform.js index d6fb4ac..36bad35 100644 --- a/www/js/platform.js +++ b/www/js/platform.js @@ -65,15 +65,9 @@ var watchLocation = function (success, error) { 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"); + router.back(); }, false); document.addEventListener("deviceready", function () { @@ -83,6 +77,13 @@ function initCordova() { //StatusBar.backgroundColorByHexString("#324150"); //StatusBar.styleLightContent(); } + router.on("routeChange", function (newRoute, previousRoute, router) { + if (newRoute.name == "home") { + StatusBar.styleDefault(); + } else { + StatusBar.styleLightContent(); + } + }); }, false); openBrowser = function (url) {