1+ const facts = [
2+ 'Do you know adult humans are 60 percent water, and our blood is 90 percent water? 🌊' ,
3+ 'Drinking water instead of soda can help with weight loss! 🥛' ,
4+ 'Do you know drinking water reduces the chance of a hangover? 🍺' ,
5+ 'Drinking water helps in enhancing physical performance! 🏋' ,
6+ 'Drinking water improves your skin health and beauty! 💃' ,
7+ 'Drinking water instead of other liquids will help you in weight loss! 🧘♀️' ,
8+ 'Drinking more water may help relieve Constipation! 🚽' ,
9+ 'Pace yourself to approach half of your recommended consumption by midday! 🌞' ,
10+ 'Drinking water when you first get up helps you to improve your immune system! 💪' ,
11+ 'Do you know drinking water before a workout will protect you from dehydration? 🏋' ,
12+ 'Drinking water helps you to regulate Body temperature! 🚶♂️' ,
13+ ] ;
114const notificationMessage = 'Hey buddy, you should drink some water.' ;
215const notificationTitle = 'Stay hydrated!' ;
316var timeInterval = 15 ;
4- // var timeInterval = 0.5;
517
618restartAlarms ( ) ;
719browser . runtime . onMessage . addListener ( handleMessage ) ;
@@ -19,20 +31,13 @@ browser.alarms.onAlarm.addListener(function (alarm) {
1931 'type' : 'basic' ,
2032 'iconUrl' : 'icons/bottle.png' ,
2133 'title' : notificationTitle ,
22- 'message' : notificationMessage
34+ 'message' : notificationMessage + '\n' + facts [ Math . floor ( Math . random ( ) * 11 ) ]
2335 } ) ;
2436} ) ;
2537
26- < << << << HEAD
2738function restartAlarms ( ) {
2839 browser . alarms . clearAll ( ) ;
2940 browser . alarms . create ( 'waterReminder' , {
3041 periodInMinutes : timeInterval
3142 } ) ;
3243}
33- = === ===
34- function restartAlarms ( ) {
35- browser . alarms . clearAll ( ) ;
36- browser . alarms . create ( "waterReminder" , { periodInMinutes : timeInterval } ) ;
37- }
38- >>> > >>> 807 d5930ddaf21127b233c49c18f27eb9ce6b0f8
0 commit comments