Skip to content

Commit

Permalink
chore : removed log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
kabir-afk committed Jun 19, 2024
1 parent 7e5e226 commit 9ca2927
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ const WAIT_ALARM = 'waitWhileLoading';
async function createAlarm() {
await chrome.alarms.create(WAIT_ALARM, {
periodInMinutes: 1 / 60 // by specifying it as fraction we can run the ⏰ in every 1 second
},()=>console.log('⏰ running inside createAlarm()',new Date().getSeconds()));
});
}

chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
Expand All @@ -788,9 +788,7 @@ chrome.alarms.onAlarm.addListener((alarm)=>{
if (alarm.name === WAIT_ALARM) {
if (state === 'ready') {
chrome.runtime.sendMessage({state:'ready'});
chrome.alarms.clear(WAIT_ALARM,()=>{
console.log('⏰ stopped at ',new Date().getSeconds());
});
chrome.alarms.clear(WAIT_ALARM);
}
}
})

0 comments on commit 9ca2927

Please sign in to comment.