Pop-up dictionary browser extension for language learning. Successor to Yomichan. (PERSONAL FORK)
1{
2 "manifest": {
3 "manifest_version": 3,
4 "name": "Yomitan Popup Dictionary",
5 "version": "$YOMITAN_VERSION",
6 "description": "Popup dictionary for language learning",
7 "author": {
8 "email": "themoeway@googlegroups.com"
9 },
10 "icons": {
11 "16": "images/icon16.png",
12 "19": "images/icon19.png",
13 "32": "images/icon32.png",
14 "38": "images/icon38.png",
15 "48": "images/icon48.png",
16 "64": "images/icon64.png",
17 "128": "images/icon128.png"
18 },
19 "action": {
20 "default_icon": {
21 "16": "images/icon16.png",
22 "19": "images/icon19.png",
23 "32": "images/icon32.png",
24 "38": "images/icon38.png",
25 "48": "images/icon48.png",
26 "64": "images/icon64.png",
27 "128": "images/icon128.png"
28 },
29 "default_title": "Yomitan",
30 "default_popup": "action-popup.html"
31 },
32 "background": {
33 "service_worker": "sw.js",
34 "type": "module"
35 },
36 "omnibox": {
37 "keyword": "yomi"
38 },
39 "content_scripts": [
40 {
41 "run_at": "document_idle",
42 "matches": [
43 "http://*/*",
44 "https://*/*",
45 "file://*/*"
46 ],
47 "match_about_blank": true,
48 "all_frames": true,
49 "js": [
50 "js/app/content-script-wrapper.js"
51 ]
52 }
53 ],
54 "minimum_chrome_version": "102.0.0.0",
55 "options_ui": {
56 "page": "settings.html",
57 "open_in_tab": true
58 },
59 "sandbox": {
60 "pages": [
61 "template-renderer.html"
62 ]
63 },
64 "permissions": [
65 "storage",
66 "clipboardWrite",
67 "unlimitedStorage",
68 "declarativeNetRequest",
69 "scripting",
70 "offscreen",
71 "contextMenus"
72 ],
73 "optional_permissions": [
74 "clipboardRead",
75 "nativeMessaging"
76 ],
77 "host_permissions": [
78 "<all_urls>"
79 ],
80 "commands": {
81 "toggleTextScanning": {
82 "suggested_key": {
83 "default": "Alt+Delete"
84 },
85 "description": "Toggle text scanning on/off"
86 },
87 "openInfoPage": {
88 "description": "Open the info page"
89 },
90 "openSettingsPage": {
91 "description": "Open the settings page"
92 },
93 "openSearchPage": {
94 "suggested_key": {
95 "default": "Alt+Insert"
96 },
97 "description": "Open the search page"
98 },
99 "openPopupWindow": {
100 "description": "Open the popup window"
101 }
102 },
103 "web_accessible_resources": [
104 {
105 "resources": [
106 "popup.html",
107 "template-renderer.html",
108 "js/*",
109 "lib/resvg.wasm"
110 ],
111 "matches": [
112 "<all_urls>"
113 ]
114 }
115 ],
116 "content_security_policy": {
117 "extension_pages": "default-src 'self'; script-src 'self' 'wasm-unsafe-eval'; img-src blob: 'self'; style-src 'self' 'unsafe-inline'; media-src *; connect-src *",
118 "sandbox": "sandbox allow-scripts; default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'unsafe-inline'"
119 }
120 },
121 "defaultVariant": "base",
122 "variants": [
123 {
124 "name": "base",
125 "buildable": false
126 },
127 {
128 "name": "chrome",
129 "inherit": "base",
130 "fileName": "yomitan-chrome.zip",
131 "excludeFiles": [
132 "background.html"
133 ]
134 },
135 {
136 "name": "chrome-dev",
137 "inherit": "chrome",
138 "fileName": "yomitan-chrome-dev.zip",
139 "modifications": [
140 {
141 "action": "replace",
142 "path": [
143 "name"
144 ],
145 "pattern": "^.*$",
146 "patternFlags": "",
147 "replacement": "$& (development build)"
148 },
149 {
150 "action": "replace",
151 "path": [
152 "description"
153 ],
154 "pattern": "^(.*)(?:\\.\\s*)?$",
155 "patternFlags": "",
156 "replacement": "$1. This is a development build."
157 }
158 ]
159 },
160 {
161 "name": "chrome-playwright",
162 "inherit": "chrome-dev",
163 "fileName": "yomitan-chrome-playwright.zip",
164 "modifications": [
165 {
166 "action": "remove",
167 "path": [
168 "optional_permissions"
169 ],
170 "item": "clipboardRead"
171 },
172 {
173 "action": "add",
174 "path": [
175 "permissions"
176 ],
177 "items": [
178 "clipboardRead"
179 ]
180 }
181 ]
182 },
183 {
184 "name": "firefox",
185 "inherit": "base",
186 "fileName": "yomitan-firefox.zip",
187 "modifications": [
188 {
189 "action": "set",
190 "path": [
191 "author"
192 ],
193 "value": "Yomidevs"
194 },
195 {
196 "action": "delete",
197 "path": [
198 "background",
199 "service_worker"
200 ]
201 },
202 {
203 "action": "delete",
204 "path": [
205 "background",
206 "type"
207 ]
208 },
209 {
210 "action": "set",
211 "path": [
212 "background",
213 "page"
214 ],
215 "value": "background.html"
216 },
217 {
218 "action": "remove",
219 "path": [
220 "web_accessible_resources",
221 0,
222 "resources"
223 ],
224 "item": "template-renderer.html"
225 },
226 {
227 "action": "delete",
228 "path": [
229 "sandbox"
230 ]
231 },
232 {
233 "action": "delete",
234 "path": [
235 "content_security_policy",
236 "sandbox"
237 ]
238 },
239 {
240 "action": "set",
241 "path": [
242 "content_security_policy",
243 "extension_pages"
244 ],
245 "value": "default-src 'self'; script-src 'self' 'wasm-unsafe-eval'; img-src blob: 'self'; style-src 'self' 'unsafe-inline'; media-src *; connect-src *"
246 },
247 {
248 "action": "set",
249 "path": [
250 "browser_specific_settings"
251 ],
252 "value": {
253 "gecko": {
254 "id": "{6b733b82-9261-47ee-a595-2dda294a4d08}",
255 "strict_min_version": "115.0"
256 },
257 "gecko_android": {
258 "strict_min_version": "115.0"
259 }
260 }
261 },
262 {
263 "action": "remove",
264 "path": [
265 "permissions"
266 ],
267 "item": "offscreen"
268 }
269 ],
270 "excludeFiles": [
271 "sw.js",
272 "offscreen.html",
273 "js/background/offscreen.js",
274 "js/background/offscreen-main.js"
275 ]
276 },
277 {
278 "name": "firefox-dev",
279 "inherit": "firefox",
280 "fileName": "yomitan-firefox-dev.zip",
281 "modifications": [
282 {
283 "action": "replace",
284 "path": [
285 "name"
286 ],
287 "pattern": "^.*$",
288 "patternFlags": "",
289 "replacement": "$& (development build)"
290 },
291 {
292 "action": "replace",
293 "path": [
294 "description"
295 ],
296 "pattern": "^(.*)(?:\\.\\s*)?$",
297 "patternFlags": "",
298 "replacement": "$1. This is a development build."
299 },
300 {
301 "action": "set",
302 "path": [
303 "browser_specific_settings",
304 "gecko",
305 "id"
306 ],
307 "value": "{2d13e145-294e-4ead-9bce-b4644b203a00}"
308 },
309 {
310 "action": "set",
311 "path": [
312 "browser_specific_settings",
313 "gecko",
314 "update_url"
315 ],
316 "value": "https://raw.githubusercontent.com/yomidevs/yomitan/metadata/updates.json"
317 }
318 ],
319 "excludeFiles": [
320 "sw.js",
321 "offscreen.html",
322 "js/background/offscreen.js",
323 "js/background/offscreen-main.js"
324 ]
325 },
326 {
327 "name": "firefox-android",
328 "inherit": "firefox",
329 "fileName": "yomitan-firefox-android"
330 },
331 {
332 "name": "safari",
333 "modifications": [
334 {
335 "action": "set",
336 "path": [
337 "author"
338 ],
339 "value": "Yomidevs"
340 },
341 {
342 "action": "remove",
343 "path": [
344 "optional_permissions"
345 ],
346 "item": "clipboardRead"
347 },
348 {
349 "action": "remove",
350 "path": [
351 "permissions"
352 ],
353 "item": "offscreen"
354 },
355 {
356 "action": "delete",
357 "path": [
358 "content_scripts",
359 0,
360 "match_about_blank"
361 ]
362 },
363 {
364 "action": "delete",
365 "path": [
366 "sandbox"
367 ]
368 },
369 {
370 "action": "set",
371 "path": [
372 "content_security_policy"
373 ],
374 "value": "default-src 'self'; script-src 'self' 'unsafe-eval'; img-src blob: 'self'; style-src 'self' 'unsafe-inline'; media-src *; connect-src *"
375 }
376 ],
377 "excludeFiles": [
378 "sw.js",
379 "offscreen.html",
380 "js/background/offscreen.js",
381 "js/background/offscreen-main.js"
382 ]
383 },
384 {
385 "name": "edge",
386 "inherit": "base",
387 "fileName": "yomitan-edge.zip",
388 "excludeFiles": [
389 "background.html"
390 ]
391 }
392 ]
393}