diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2020-04-11 12:11:59 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2020-04-11 12:11:59 -0400 |
| commit | f5b0bf6abf44a0309b7ff7c835f3c0df1835d415 (patch) | |
| tree | 8cae7184a423127056fd42020500c871ef42fd5f /www/js | |
| parent | 4e07e5640f96d2be9bf87af8ac5d2679c6a61a5f (diff) | |
fix platform detection
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/NVR.js | 1 | ||||
| -rwxr-xr-x | www/js/app.js | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/www/js/NVR.js b/www/js/NVR.js index 01d24730..914b824a 100644 --- a/www/js/NVR.js +++ b/www/js/NVR.js @@ -373,6 +373,7 @@ angular.module('zmApp.controllers') .then ( function () {return localforage.removeItem('cached_multi_port');}) .then ( function () {return localforage.removeItem('cached_timezone');}) .catch ( function (err) {debug ('Error removing all caches: '+JSON.stringify(err));}); + } function cache_or_http(url,key,doCrypt, expiry) { diff --git a/www/js/app.js b/www/js/app.js index 076bde17..9c745a9a 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -1151,8 +1151,10 @@ angular.module('zmApp', [ NVR.log("Device is ready"); //console.log ("*************** PLATFORM IS: "+ionic.Platform.platform()); + var ua = navigator.userAgent.toLowerCase(); + NVR.debug ("UA is "+ua); // var ld = NVR.getLogin(); - if ($ionicPlatform.is('ios') || ionic.Platform.platform() == 'macintel') + if (($ionicPlatform.is('ios') || ionic.Platform.platform() == 'macintel') && ua.indexOf("electron") == -1) $rootScope.platformOS = "ios"; if ($ionicPlatform.is('android')) $rootScope.platformOS = "android"; |
