forked from sailist/chatgpt-enhancement-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
manifest.ts
executable file
·77 lines (72 loc) · 2.08 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
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
import packageJson from "./package.json";
/**
* After changing, please reload the extension at `chrome://extensions`
*/
const manifest: chrome.runtime.ManifestV3 = {
manifest_version: 3,
name: "ChatGPT Enhancement",
version: packageJson.version,
description: packageJson.description,
options_page: "src/pages/options/index.html",
background: {
service_worker: "src/pages/background/index.js",
type: "module",
},
action: {
default_popup: "src/pages/popup/index.html",
default_icon: {
"16": "icon-unava-16.png",
"32": "icon-unava-32.png",
},
},
// chrome_url_overrides: {
// newtab: "src/pages/newtab/index.html",
// },
icons: {
"128": "icon-128.png",
"32": "icon-32.png",
"16": "icon-16.png",
},
content_scripts: [
{
// matches: ["http://*/*", "https://*/*", "<all_urls>"],
matches: ["<all_urls>"],
js: ["src/pages/content/index.js"],
// KEY for cache invalidation
css: ["assets/css/contentStyle.chunk.css"],
},
{
matches: ["https://chat.openai.com/*"],
css: ["assets/css/optionsIndex.chunk.css"],
},
],
omnibox: { keyword: "." },
// devtools_page: "src/pages/devtools/index.html",
permissions: [
"contextMenus", // To support getting selection text in extension (like pdf reader)
// "scripting", // inject content scripts
// sendMessage from background to tab, create/update active tab, listen update and remove event for chatgpt page detection
"tabs", // sendMessage between tabs and background
"activeTab", // query currently active tab
"webRequest", // detect request url for id
"storage", // storage dialogue history
"unlimitedStorage", //
],
web_accessible_resources: [
{
resources: [
"assets/js/*.js",
"assets/css/*.css",
"icon-128.png",
"icon-32.png",
"icon-ava-32.png",
"icon-ava-16.png",
"icon-unava-32.png",
"icon-unava-16.png",
],
matches: ["*://*/*"],
},
],
host_permissions: ["https://chat.openai.com/*"],
};
export default manifest;