Skip to content

Commit 811cf7a

Browse files
committed
Rewrite for Manifest V3, removed bloating libs like jquery, backbone and underscore. (WIP)
1 parent 3a8dfae commit 811cf7a

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

js/main.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -142,30 +142,30 @@ function stopInterval() {
142142
}
143143

144144
chrome.alarms.onAlarm.addListener((alarm) => {
145-
console.log('alarm fired');
146-
console.log(alarm);
147145
if (alarm.name === 'checkIntervalAlarm') {
148146
stopInterval();
149147
startInterval();
150148
}
151149
});
152150

153151
chrome.runtime.onSuspend.addListener(function () {
154-
console.log('unloading');
155152
stopInterval();
156153
});
157154

158155

159156
chrome.alarms.onAlarm.addListener((alarm) => {
160-
console.log('alarm fired');
161157
if (alarm.name === 'checkIntervalAlarm') {
162158
stopInterval();
163159
startInterval();
164160
}
165161
});
166162

167163
chrome.runtime.onInstalled.addListener(() => {
168-
console.log('installed');
169164
startInterval();
170-
chrome.alarms.create('checkIntervalAlarm', { periodInMinutes: 1 * 60000 });
165+
chrome.alarms.create('checkIntervalAlarm', { periodInMinutes: 1 });
166+
});
167+
168+
chrome.runtime.onStartup.addListener(() => {
169+
startInterval();
170+
chrome.alarms.create('checkIntervalAlarm', { periodInMinutes: 1 });
171171
});

manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "IP Address & Geolocation",
3-
"version": "3.0.2",
3+
"version": "3.0.3",
44
"manifest_version": 3,
55
"icons": {
66
"16": "img/icon16.png",

0 commit comments

Comments
 (0)