Skip to content

Commit 54e4428

Browse files
committed
Re-added pebble-js-app.js file
1 parent 1a9bc16 commit 54e4428

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/pkjs/index.js

Whitespace-only changes.

src/pkjs/pebble-js-app.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Pebble.addEventListener('ready', function(e) {
2+
// console.log('JavaScript app ready and running!');
3+
});
4+
5+
Pebble.addEventListener('showConfiguration', function(e) {
6+
Pebble.openURL('https://steka.github.io/fibonacci_clock/config.htm');
7+
});
8+
9+
Pebble.addEventListener('webviewclosed', function(e) {
10+
var config_data = JSON.parse(decodeURIComponent(e.response));
11+
// console.log('Config window returned: ', JSON.stringify(config_data));
12+
13+
Pebble.sendAppMessage(config_data, function() {
14+
// console.log('Sent config data to Pebble');
15+
}, function() {
16+
// console.log('Failed to send config data!');
17+
});
18+
});

0 commit comments

Comments
 (0)