You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2015/07/23 02:06:22 UTC

[1/2] js commit: Fix webOS SmartTV/wearable detection

Repository: cordova-js
Updated Branches:
  refs/heads/master e483adc8b -> e994460cf


Fix webOS SmartTV/wearable detection


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/e994460c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/e994460c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/e994460c

Branch: refs/heads/master
Commit: e994460cf5d0855db7cdac0b3e297dc3f67f880d
Parents: 98b23ad
Author: Jason Robitaille <ja...@lge.com>
Authored: Thu Jun 4 10:48:57 2015 -0700
Committer: Steve Gill <st...@gmail.com>
Committed: Wed Jul 22 17:03:01 2015 -0700

----------------------------------------------------------------------
 src/legacy-exec/webos/platform.js      | 2 +-
 src/legacy-exec/webos/webos/service.js | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/e994460c/src/legacy-exec/webos/platform.js
----------------------------------------------------------------------
diff --git a/src/legacy-exec/webos/platform.js b/src/legacy-exec/webos/platform.js
index 965a6ad..78c654a 100644
--- a/src/legacy-exec/webos/platform.js
+++ b/src/legacy-exec/webos/platform.js
@@ -23,7 +23,7 @@ module.exports = {
     id: 'webos',
     bootstrap: function() {
         var channel = require('cordova/channel');
-        var isLegacy = ((navigator.userAgent.indexOf("webOS")>-1) || (navigator.userAgent.indexOf("hpwOS")>-1));
+        var isLegacy = /(?:web|hpw)OS\/(\d+)/.test(navigator.userAgent);
         var webOSjsLib = (window.webOS!==undefined);
         if(!webOSjsLib && window.PalmSystem && window.PalmSystem.stageReady && isLegacy) {
             window.PalmSystem.stageReady();

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/e994460c/src/legacy-exec/webos/webos/service.js
----------------------------------------------------------------------
diff --git a/src/legacy-exec/webos/webos/service.js b/src/legacy-exec/webos/webos/service.js
index 0e4b111..315cb4a 100644
--- a/src/legacy-exec/webos/webos/service.js
+++ b/src/legacy-exec/webos/webos/service.js
@@ -19,7 +19,7 @@
  *
 */
 
-var isLegacy = ((navigator.userAgent.indexOf("webOS")>-1) || (navigator.userAgent.indexOf("hpwOS")>-1));
+var isLegacy = /(?:web|hpw)OS\/(\d+)/.test(navigator.userAgent);
 
 function LS2Request(uri, params) {
     this.uri = uri;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[2/2] js commit: Add webOS as a platform to build from/for.

Posted by st...@apache.org.
Add webOS as a platform to build from/for.


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/98b23ad6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/98b23ad6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/98b23ad6

Branch: refs/heads/master
Commit: 98b23ad69d6822cd9abf5b2aad641ae83dbbef2d
Parents: e483adc
Author: Jason Robitaille <ja...@lge.com>
Authored: Thu Jun 4 10:48:16 2015 -0700
Committer: Steve Gill <st...@gmail.com>
Committed: Wed Jul 22 17:03:01 2015 -0700

----------------------------------------------------------------------
 Gruntfile.js | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/98b23ad6/Gruntfile.js
----------------------------------------------------------------------
diff --git a/Gruntfile.js b/Gruntfile.js
index 44e1dda..68f70b0 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -44,6 +44,7 @@ module.exports = function(grunt) {
             "windows": { useWindowsLineEndings: true },
             "wp8": { useWindowsLineEndings: true },
             "firefoxos": {},
+            "webos": {},
             "ubuntu": {},
             "browser": {}
         },


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org