-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanifest.ts
More file actions
50 lines (49 loc) · 1.26 KB
/
manifest.ts
File metadata and controls
50 lines (49 loc) · 1.26 KB
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'
export default defineManifest(async (env) => {
// console.log("defineManifesttttt", env)
return {
manifest_version: 3,
name: 'Search Tab',
description: 'Locate an opened tab',
version: packageJson.version,
host_permissions: ['<all_urls>'],
action: {
default_title: 'Default Title',
default_popup: 'index.html',
default_icon: {
'32': 'weixin.png',
'72': 'weixin.png',
'128': 'weixin.png',
'512': 'weixin.png',
},
},
content_scripts: [
{
matches: ['<all_urls>'],
js: ['src/content-script.ts'],
all_frames: true,
},
],
background: {
service_worker: 'src/background.ts',
},
commands: {
_execute_action: {
suggested_key: {
default: 'Ctrl+Shift+Q',
mac: 'Command+Shift+Q',
},
description: 'Active Extension',
},
toggle: {
suggested_key: {
default: 'Ctrl+Shift+H',
mac: 'Command+Shift+H',
},
description: 'Active Extension',
},
},
permissions: ['tabs', 'activeTab', 'declarativeNetRequest', 'declarativeNetRequestFeedback'],
}
})