Skip to content

Commit 58c0b21

Browse files
authored
Add clkinfo.js for displaying fun facts
1 parent f1f1ed4 commit 58c0b21

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

apps/textfacts/clkinfo.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
(function() {
2+
return {
3+
name: "Facts",
4+
items: [
5+
{ name : "Facts",
6+
get : () => ({ text : "Fact",
7+
img : atob("GBiBAB8A+D/D/DBmDDA8DLYYbbeZ7bDbDbAYDbAYDbcY7bHbjbBaDbAYDbcY7bHZjbBaDbAYDbgYPZ+Z/YHbgYA+AZ///f///4AYAA==") }),
8+
show : function() { // shown - if running, start animation
9+
this.emit('redraw');
10+
},
11+
hide: function(){
12+
13+
},
14+
run : function() { // tapped - cycle between start and stop
15+
E.showPrompt(require('textsource').getRandomText().txt,{
16+
title: "Fun Fact",
17+
buttons:{"Ok":true}
18+
19+
}).then(function(v){
20+
Bangle.load();
21+
});
22+
}
23+
}
24+
]
25+
};
26+
});

0 commit comments

Comments
 (0)