Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0C4E618021 for ; Thu, 23 Jul 2015 00:06:28 +0000 (UTC) Received: (qmail 11308 invoked by uid 500); 23 Jul 2015 00:06:22 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 11269 invoked by uid 500); 23 Jul 2015 00:06:22 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 11255 invoked by uid 99); 23 Jul 2015 00:06:22 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jul 2015 00:06:22 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B3CAFE33C8; Thu, 23 Jul 2015 00:06:22 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: steven@apache.org To: commits@cordova.apache.org Date: Thu, 23 Jul 2015 00:06:22 -0000 Message-Id: <16ddff64f4aa4739bde35fe97a28c8bf@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [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 Authored: Thu Jun 4 10:48:57 2015 -0700 Committer: Steve Gill 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