diff options
author | Alexey 'Cluster' Avdyukhin <ClusterM@users.noreply.github.com> | 2015-04-24 02:54:56 +0300 |
---|---|---|
committer | Alexey 'Cluster' Avdyukhin <ClusterM@users.noreply.github.com> | 2015-04-24 02:54:56 +0300 |
commit | 10dd1f670c901e0e82cd4af5fda4ecdbdad63a7a (patch) | |
tree | 0530bd2a1ea316b8495621f0eea2dfb537c97dd6 | |
parent | 0e279ace5de7eaac7d7bc1083bbb31f5b3eb5d11 (diff) |
Platform detection in JS
-rw-r--r-- | src/js/pebble-js-app.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/js/pebble-js-app.js b/src/js/pebble-js-app.js index e9d8b40..dea2037 100644 --- a/src/js/pebble-js-app.js +++ b/src/js/pebble-js-app.js @@ -24,7 +24,9 @@ Pebble.addEventListener("ready", function() { Pebble.addEventListener("showConfiguration", function() { console.log("showing configuration"); var cfg = '?config=' + encodeURI(JSON.stringify(options)); - Pebble.openURL("http://clusterrr.com/pebble_configs/mario.php" + cfg); + var watch = Pebble.getActiveWatchInfo(); + var platform = "&platform=" + ((watch != null) ? watch.platform : "unknown"); + Pebble.openURL("http://clusterrr.com/pebble_configs/mario.php" + cfg + platform); }); Pebble.addEventListener("webviewclosed", function(e) { |