Skip to content

Commit

Permalink
Rewrite for Manifest V3, removed bloating libs like jquery, backbone …
Browse files Browse the repository at this point in the history
…and underscore. (WIP)
  • Loading branch information
AykutCevik committed Jun 4, 2024
1 parent 3a8dfae commit 811cf7a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,30 +142,30 @@ function stopInterval() {
}

chrome.alarms.onAlarm.addListener((alarm) => {
console.log('alarm fired');
console.log(alarm);
if (alarm.name === 'checkIntervalAlarm') {
stopInterval();
startInterval();
}
});

chrome.runtime.onSuspend.addListener(function () {
console.log('unloading');
stopInterval();
});


chrome.alarms.onAlarm.addListener((alarm) => {
console.log('alarm fired');
if (alarm.name === 'checkIntervalAlarm') {
stopInterval();
startInterval();
}
});

chrome.runtime.onInstalled.addListener(() => {
console.log('installed');
startInterval();
chrome.alarms.create('checkIntervalAlarm', { periodInMinutes: 1 * 60000 });
chrome.alarms.create('checkIntervalAlarm', { periodInMinutes: 1 });
});

chrome.runtime.onStartup.addListener(() => {
startInterval();
chrome.alarms.create('checkIntervalAlarm', { periodInMinutes: 1 });
});
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "IP Address & Geolocation",
"version": "3.0.2",
"version": "3.0.3",
"manifest_version": 3,
"icons": {
"16": "img/icon16.png",
Expand Down

0 comments on commit 811cf7a

Please sign in to comment.