-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanifest.config.ts
More file actions
71 lines (62 loc) · 2.23 KB
/
Copy pathmanifest.config.ts
File metadata and controls
71 lines (62 loc) · 2.23 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
69
70
71
import { defineManifest } from '@crxjs/vite-plugin'
import pkg from './package.json'
// MV3 manifest. The panel + overlays are injected by the content script into a
// Shadow DOM; the background worker only translates the keyboard command / icon
// click into a "toggle" message to the active tab.
export default defineManifest({
manifest_version: 3,
name: 'Avemo Dev',
version: pkg.version,
description: pkg.description,
icons: {
16: 'icons/icon-16.png',
32: 'icons/icon-32.png',
48: 'icons/icon-48.png',
128: 'icons/icon-128.png',
},
// No popup — clicking the toolbar icon toggles the in-page panel (handled in
// the background worker via chrome.action.onClicked).
action: {
default_title: 'Avemo Dev — toggle panel (⌘⇧Y)',
default_icon: {
16: 'icons/icon-16.png',
32: 'icons/icon-32.png',
},
},
background: {
service_worker: 'src/background/service-worker.ts',
type: 'module',
},
content_scripts: [
{
matches: ['http://*/*', 'https://*/*'],
js: ['src/content/main.ts'],
run_at: 'document_idle',
all_frames: false,
},
],
permissions: ['storage', 'activeTab', 'scripting'],
// captureVisibleTab (the full-page screenshot tool) checks specifically for the
// `<all_urls>` host permission (or activeTab granted via a gesture) — a
// http/https pattern pair does NOT satisfy it. The content script already runs
// on every http/https page, so this widens nothing the extension can't reach.
host_permissions: ['<all_urls>'],
commands: {
'toggle-panel': {
// NB: ⌘⇧G is the browser's built-in "Find previous" on macOS, so it never
// reached the extension — ⌘⇧Y / Ctrl⇧Y is conflict-free (rebindable at
// chrome://extensions/shortcuts).
suggested_key: { default: 'Ctrl+Shift+Y', mac: 'Command+Shift+Y' },
description: 'Toggle the Avemo Dev panel',
},
},
// The bundled Inter woff2 files, referenced by the injected @font-face via
// chrome.runtime.getURL. (On ultra-strict-CSP sites the font may be blocked and
// gracefully falls back to system-ui.)
web_accessible_resources: [
{
resources: ['fonts/*.woff2'],
matches: ['http://*/*', 'https://*/*'],
},
],
})