-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathbackground.js
More file actions
36 lines (28 loc) · 787 Bytes
/
background.js
File metadata and controls
36 lines (28 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import {
initializeContextMenus,
initializeMessageRelay,
initializeOmnibox,
initializeSidePanel,
openWelcomePage,
setColor,
} from "/scripts/background/utils.js";
console.log("Initialized background!");
try {
// Fired when:
// - the extension is first installed
// - the extension is updated to a new version
// - the browser is updated to a new version.
chrome.runtime.onInstalled.addListener((details) => {
if (details.reason === chrome.runtime.OnInstalledReason.INSTALL) {
openWelcomePage(details);
}
chrome.runtime.setUninstallURL("https://buildingbrowserextensions.com");
setColor();
});
initializeContextMenus();
initializeMessageRelay();
initializeOmnibox();
initializeSidePanel();
} catch (e) {
console.error(e);
}