| 
														
															@@ -222,13 +222,13 @@ export function hideBadge() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 export async function setMessageCount () { 
														 | 
														
														 | 
														
															 export async function setMessageCount () { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     const { accessToken: token = '', uid = '' } = await getChromeStorage('userInfo') || {} 
														 | 
														
														 | 
														
															     const { accessToken: token = '', uid = '' } = await getChromeStorage('userInfo') || {} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    alarmFun(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     if(token) { 
														 | 
														
														 | 
														
															     if(token) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         getMessageInfo(); 
														 | 
														
														 | 
														
															         getMessageInfo(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         // setInterval(() => { 
														 | 
														
														 | 
														
															         // setInterval(() => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         //     getMessageInfo(); 
														 | 
														
														 | 
														
															         //     getMessageInfo(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         // }, 10000); 
														 | 
														
														 | 
														
															         // }, 10000); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         // 60000 
														 | 
														
														 | 
														
															         // 60000 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        alarmFun(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 } 
														 | 
														
														 | 
														
															 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -238,20 +238,22 @@ function alarmFun() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         //1分鐘之後開始(該值至少大於1)  
														 | 
														
														 | 
														
															         //1分鐘之後開始(該值至少大於1)  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         delayInMinutes: 1,  
														 | 
														
														 | 
														
															         delayInMinutes: 1,  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         //與上方等同的寫法是  
														 | 
														
														 | 
														
															         //與上方等同的寫法是  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        //when : Date.now() + 6000, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        // when : Date.now() + 6000, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         //開始後每一分鐘執行一次(該值至少大於1)  
														 | 
														
														 | 
														
															         //開始後每一分鐘執行一次(該值至少大於1)  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         periodInMinutes : 1  
														 | 
														
														 | 
														
															         periodInMinutes : 1  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     }; 
														 | 
														
														 | 
														
															     }; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     //每次加載就清空定時器 
														 | 
														
														 | 
														
															     //每次加載就清空定時器 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    // chrome.alarms.clearAll(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    chrome.alarms.clearAll(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     //創造定時器 
														 | 
														
														 | 
														
															     //創造定時器 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     chrome.alarms.create('testAlarm',alarmInfo); 
														 | 
														
														 | 
														
															     chrome.alarms.create('testAlarm',alarmInfo); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    console.log("onAlarm-1",); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     chrome.alarms.onAlarm.addListener(function(alarm) { 
														 | 
														
														 | 
														
															     chrome.alarms.onAlarm.addListener(function(alarm) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        getMessageInfo(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         //計算定時器觸發次數 
														 | 
														
														 | 
														
															         //計算定時器觸發次數 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         console.log("onAlarm-" , ++count, alarm); 
														 | 
														
														 | 
														
															         console.log("onAlarm-" , ++count, alarm); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        getMessageInfo(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     }); 
														 | 
														
														 | 
														
															     }); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 } 
														 | 
														
														 | 
														
															 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 |