You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2014/11/18 22:57:16 UTC
cordova-plugin-device git commit: Changing device.platform to always
report the platform as "browser".
Repository: cordova-plugin-device
Updated Branches:
refs/heads/master 974ef81cb -> bf923a027
Changing device.platform to always report the platform as "browser".
The current implementation relies on the value returned by the web
browser's `navigator.platform`, which has many possible values, making
platform-specific checks difficult. For example, a browser platform
build viewed on an Android client might report the `device.platform`
as "Android", causing the Cordova app to execute code intended for
the Android platform.
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/commit/bf923a02
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/tree/bf923a02
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/diff/bf923a02
Branch: refs/heads/master
Commit: bf923a027903fd25ce3c84b751976cef6503935c
Parents: 974ef81
Author: Dave Lane <dc...@gmail.com>
Authored: Mon Nov 17 21:50:53 2014 -0600
Committer: Dave Lane <dc...@gmail.com>
Committed: Mon Nov 17 21:50:53 2014 -0600
----------------------------------------------------------------------
src/browser/DeviceProxy.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/bf923a02/src/browser/DeviceProxy.js
----------------------------------------------------------------------
diff --git a/src/browser/DeviceProxy.js b/src/browser/DeviceProxy.js
index 45e1d88..e3c3f11 100644
--- a/src/browser/DeviceProxy.js
+++ b/src/browser/DeviceProxy.js
@@ -22,7 +22,7 @@ var browser = require('cordova/platform');
var cordova = require('cordova');
function getPlatform() {
- return navigator.platform;
+ return "browser";
}
function getModel() {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org