-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathmanifest.js
executable file
·44 lines (42 loc) · 1.13 KB
/
manifest.js
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
37
38
39
40
41
42
43
44
import fs from "node:fs";
const packageJson = JSON.parse(fs.readFileSync("./package.json", "utf8"));
/**
* @type {chrome.runtime.ManifestV3}
*/
const manifest = {
manifest_version: 3,
homepage_url: "https://github.com/amasin76/intranet-web-extension",
name: "ALX Intranet",
version: packageJson.version,
description: packageJson.description,
permissions: ["storage", "scripting", "clipboardWrite"],
host_permissions: ["https://intranet.alxswe.com/*"],
options_page: "src/pages/options/index.html",
background: {
service_worker: "src/pages/background/index.js",
type: "module",
},
action: {
default_popup: "src/pages/popup/index.html",
default_icon: "icon-32.png",
},
icons: {
128: "icon-128.png",
},
content_scripts: [
{
matches: ["https://intranet.alxswe.com/*"],
js: ["src/pages/content/index.js"],
run_at: "document_end",
// KEY for cache invalidation
css: ["assets/css/contentStyle<KEY>.chunk.css"],
},
],
web_accessible_resources: [
{
resources: ["assets/js/*.js", "assets/css/*.css", "icon-128.png", "icon-34.png"],
matches: ["https://intranet.alxswe.com/*"],
},
],
};
export default manifest;