-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmanifest.ts
45 lines (44 loc) · 1.22 KB
/
manifest.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
import { type ManifestV3Export } from '@crxjs/vite-plugin'
export const manifest: ManifestV3Export = {
manifest_version: 3,
name: 'Zen mode - Block distraction',
description: 'An extension for blocking websites to keep you in zen mode',
version: process.env.npm_package_version,
action: {
default_popup: 'index.html',
},
options_page: 'src/options/index.html',
icons: {
128: 'logo.png',
},
background: {
service_worker: 'src/background/service-worker.ts',
type: 'module',
},
web_accessible_resources: [
{
resources: ['public/*.jpg', 'src/blocked/**'],
matches: ['*://*/*'],
},
],
permissions: [
'activeTab',
'declarativeNetRequest',
// This permission is need for redirecting
'declarativeNetRequestWithHostAccess',
'tabs',
'unlimitedStorage',
'storage',
// This permission is needed for "Take a break" feature
'alarms',
],
content_scripts: [
{
js: ['src/content/main.tsx'],
matches: ['https://*/*', 'http://*/*'],
},
],
// Host permissions for all urls is needed because websites to block are determined by users.
// Thus extension does not know which urls to block in advance
host_permissions: ['<all_urls>'],
}