-
Notifications
You must be signed in to change notification settings - Fork 2
/
manifest.config.ts
50 lines (47 loc) · 1.52 KB
/
manifest.config.ts
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
import { defineManifest } from '@crxjs/vite-plugin'
import packageJson from './package.json'
const { version } = packageJson
const [major, minor, patch, label = '0'] = version.replace(/[^\d.-]+/g, '').split(/[.-]/)
export default defineManifest(async env => ({
manifest_version: 3,
name:
env.mode === 'staging'
? '[INTERNAL] Gachon Tools - 사이버캠퍼스 확장프로그램'
: 'Gachon Tools - 사이버캠퍼스 확장프로그램',
description: '가천대학교 사이버캠퍼스 확장프로그램',
version: label === '0' ? `${major}.${minor}.${patch}` : `${major}.${minor}.${patch}.${label}`,
version_name: version,
action: {
default_title: 'popup',
default_popup: 'src/pages/popup/index.html',
},
icons: {
'16': 'logo16.png',
'48': 'logo48.png',
'128': 'logo128.png',
},
background: {
service_worker: 'src/pages/background/index.ts',
type: 'module',
},
content_scripts: [
{
matches: ['https://cyber.gachon.ac.kr/*'],
exclude_matches: [
'https://cyber.gachon.ac.kr/login.php*',
'https://cyber.gachon.ac.kr/mod/ubfile/viewer.php*',
'https://cyber.gachon.ac.kr/mod/vod/viewer.php*',
],
js: ['src/pages/content/main.tsx'],
},
],
web_accessible_resources: [
{
resources: ['assets/js/*.js', 'assets/css/*.css'],
matches: ['*:https://*/*'],
},
],
host_permissions: ['https://cyber.gachon.ac.kr/*'],
options_page: 'src/pages/options/index.html',
permissions: ['storage', 'scripting', 'activeTab'],
}))