diff options
-rw-r--r-- | examples/jarvis.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/examples/jarvis.js b/examples/jarvis.js index 7b07c52..0b24be7 100644 --- a/examples/jarvis.js +++ b/examples/jarvis.js @@ -57,12 +57,19 @@ function tileHandler(send, source, tiles){ } var notif = new Space(); -notif.adhoc('\ +notifsrc = '\ \n\ For a node.js YWOT api: \n\ & http://github.com/feynmansfedora/ywot-clean \n\ -& Try `jarvis` today \n\ - '); +& Try `jarvis` today. Uptime: UPTIME \n\ + ' +var hrsUp = 0; +function notifRefresh(){ + notif.adhoc(notifsrc.replace('UPTIME', hrsUp + 'hrs')); + setTimeout(notifRefresh, 3600*1000); + hrsUp += 1; +} +notifRefresh(); notif.loc = [-6, 20]; var ctrl = ms(notif); |