Repository navigation
Expand file tree
/
Copy pathwxt.config.ts
More file actions
68 lines (67 loc) · 1.96 KB
/
Copy pathwxt.config.ts
File metadata and controls
68 lines (67 loc) · 1.96 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import { defineConfig } from 'wxt';
import { TEMPORARY_TEST_MODE } from './src/shared/flags';
export default defineConfig({
targetBrowsers: ['chrome', 'firefox'],
zip: {
excludeSources: ['store-assets/**'],
},
webExt:
process.env.WXT_CHROMIUM_BINARY
? {
binaries: {
chrome: process.env.WXT_CHROMIUM_BINARY,
},
startUrls: ['https://example.com'],
}
: undefined,
manifest: ({ browser }) => ({
name: 'Tweak',
description: 'Save element removal, zoom, appearance, CSS, and local user-script settings for each website.',
homepage_url: 'https://github.com/yednapg/tweak',
icons: {
16: 'icon/16.png',
32: 'icon/32.png',
48: 'icon/48.png',
96: 'icon/96.png',
128: 'icon/128.png',
},
action: {
default_title: 'Open Tweak',
default_icon: {
16: 'icon/16.png',
32: 'icon/32.png',
48: 'icon/48.png',
96: 'icon/96.png',
128: 'icon/128.png',
},
},
minimum_chrome_version: browser === 'chrome' ? '120' : undefined,
permissions: browser === 'chrome'
? ['storage', 'activeTab', 'scripting', 'tabs', 'userScripts']
: ['storage', 'activeTab', 'scripting', 'tabs'],
optional_permissions: browser === 'firefox' ? ['userScripts'] : undefined,
host_permissions: TEMPORARY_TEST_MODE ? [] : ['http://*/*', 'https://*/*'],
content_scripts: TEMPORARY_TEST_MODE
? []
: [
{
matches: ['http://*/*', 'https://*/*'],
js: ['editor.js'],
run_at: 'document_start',
all_frames: false,
},
],
browser_specific_settings:
browser === 'firefox'
? {
gecko: {
id: 'tweak@local.extension',
strict_min_version: '142.0',
data_collection_permissions: {
required: ['none'],
},
},
}
: undefined,
}),
});