-
Notifications
You must be signed in to change notification settings - Fork 7
/
manifest.config.js
59 lines (55 loc) · 1.85 KB
/
manifest.config.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import { defineManifest } from '@crxjs/vite-plugin';
import 'dotenv/config';
import packageJson from './package.json';
const { version } = packageJson
export const realVersion = `${new Date().getUTCFullYear()}.${new Date().getUTCMonth() + 1}${String(new Date().getUTCDate()).padStart(2, "0")}.${new Date().getUTCMinutes()}${String(new Date().getUTCHours()).padStart(2, "0")}.${new Date().getUTCSeconds()}${String(new Date().getUTCMilliseconds()).padStart(3, "0")}`;
export default defineManifest(async (env) => ({
manifest_version: 3,
// In UTC time: YYYY.MMDD.HHMM.SSmmm
version: realVersion,
// semver is OK in "version_name"
version_name: version + (process.argv[4] === "production" ? "" : ` Dev Build ${realVersion}`),
"name": "SAS Powerschool Enhancement Suite",
"description": "Provides various enhancements for SAS Powerschool",
"action": {
"default_popup": "src/popup/index.html"
},
"content_scripts": [
{
"matches": ["https://powerschool.sas.edu.sg/guardian/scores.html*"],
"js": ["src/content_script/scores/index.ts"],
},
{
"matches": ["https://powerschool.sas.edu.sg/*"],
"js": ["src/content_script/def/index.ts"]
},
{
"matches": ["https://powerschool.sas.edu.sg/public/*"],
"js": ["src/content_script/home/index.ts"]
},
{
"matches": [
"https://powerschool.sas.edu.sg/guardian/home.html*"
],
"js": ["src/content_script/guardianHome/index.ts"]
}
],
"options_ui": {
"page": "src/options/index.html",
"open_in_tab": false
},
"icons": {
"128": "public/icon.png"
},
"permissions": ["storage"],
"web_accessible_resources": [
{
"matches": ["https://powerschool.sas.edu.sg/*"],
"resources": ["public/icon.png"],
"use_dynamic_url": false
},
],
"background": {
"service_worker": "src/background.ts",
}
}))