-
Notifications
You must be signed in to change notification settings - Fork 79
/
manifest.config.ts
99 lines (98 loc) · 2.51 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import { defineManifest } from '@crxjs/vite-plugin'
export default defineManifest(async (env) => {
return {
manifest_version: 3,
name: '__MSG_appName__',
description: '__MSG_appDesc__',
default_locale: 'en',
version: '1.5.1',
icons: {
'16': 'src/assets/icon.png',
'32': 'src/assets/icon.png',
'48': 'src/assets/icon.png',
'128': 'src/assets/icon.png',
},
background: {
service_worker: 'src/background/index.ts',
type: 'module',
},
action: {},
host_permissions: [
'https://*.bing.com/',
'https://*.openai.com/',
'https://*.xfyun.cn/',
'https://*.llama2.ai/',
'https://*.plausible.io/',
'https://gemini.google.com/',
'https://*.toscl.com/',
'https://*.aliyun.com/',
'https://*.pi.ai/',
'https://*.anthropic.com/',
'https://*.claude.ai/',
'https://*.lmsys.org/',
],
"content_security_policy": {
"extension_pages": "script-src 'self' 'wasm-unsafe-eval'; object-src 'self'"
},
optional_host_permissions: ['https://*/*', 'wss://*/*'],
permissions: ['storage', 'unlimitedStorage', 'sidePanel', 'declarativeNetRequestWithHostAccess'],
content_scripts: [
{
matches: ['https://chat.openai.com/*'],
js: ['src/content-script/chatgpt-inpage-proxy.ts'],
},
{
"matches": ['https://*.toscl.com/*'],
"js": ["src/content-script/chatdev-inpage.tsx"]
}
],
commands: {
'open-app': {
suggested_key: {
default: 'Alt+L',
windows: 'Alt+L',
linux: 'Alt+L',
mac: 'Command+L',
},
description: 'Open ChatDev app',
},
},
side_panel: {
default_path: 'sidepanel.html',
},
declarative_net_request: {
rule_resources: [
{
id: 'ruleset_chatgpt',
enabled: true,
path: 'src/rules/chatgpt.json',
},
{
id: 'ruleset_lmsys',
enabled: true,
path: 'src/rules/lmsys.json',
},
{
id: 'ruleset_bing',
enabled: true,
path: 'src/rules/bing.json',
},
{
id: 'ruleset_ddg',
enabled: true,
path: 'src/rules/ddg.json',
},
{
id: 'ruleset_qianwen',
enabled: true,
path: 'src/rules/qianwen.json',
},
{
id: 'ruleset_baichuan',
enabled: true,
path: 'src/rules/baichuan.json',
},
],
},
}
})