Skip to content

Commit bb35be5

Browse files
authored
Chrome Manifest v3 Support (#5403)
Support MV3 for Chrome, FF will remain on MV2 with MV3 compat layer. Tested in FF 123 and Chrome 122.
1 parent 5069784 commit bb35be5

File tree

4 files changed

+228
-201
lines changed

4 files changed

+228
-201
lines changed

chrome/beta/manifest.json

+108-96
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,109 @@
11
{
2-
"manifest_version": 2,
3-
"name": "__name__",
4-
"version": "__version__",
5-
"description": "__description__",
6-
"author": "__author__",
7-
"homepage_url": "__homepage__",
8-
"minimum_chrome_version": "114",
9-
"icons": {
10-
"48": "icon48.png",
11-
"128": "icon128.png"
12-
},
13-
"page_action": {
14-
"default_icon": {
15-
"19": "css-on-small.png",
16-
"38": "css-on.png"
17-
}
18-
},
19-
"options_ui": {
20-
"page": "options.html",
21-
"open_in_tab": true
22-
},
23-
"background": {
24-
"scripts": [
25-
"background.entry.js"
26-
]
27-
},
28-
"content_scripts": [{
29-
"matches": [
30-
"https://*.reddit.com/*"
31-
],
32-
"all_frames": true,
33-
"exclude_matches": [
34-
"https://mod.reddit.com/*",
35-
"https://ads.reddit.com/*",
36-
"https://i.reddit.com/*",
37-
"https://m.reddit.com/*",
38-
"https://static.reddit.com/*",
39-
"https://thumbs.reddit.com/*",
40-
"https://blog.reddit.com/*",
41-
"https://code.reddit.com/*",
42-
"https://about.reddit.com/*",
43-
"https://sh.reddit.com/*",
44-
"https://*.reddit.com/talk/*",
45-
"https://*.reddit.com/chat/*",
46-
"https://*.reddit.com/*.compact",
47-
"https://*.reddit.com/*.compact?*",
48-
"https://*.reddit.com/*.mobile",
49-
"https://*.reddit.com/*.mobile?*",
50-
"https://*.reddit.com/*.json",
51-
"https://*.reddit.com/*.json?*",
52-
"https://*.reddit.com/*.json-html",
53-
"https://*.reddit.com/*.json-html?*"
54-
],
55-
"js": [
56-
"foreground.entry.js"
57-
],
58-
"css": [
59-
"res.css"
60-
],
61-
"run_at": "document_start"
62-
}],
63-
"content_security_policy": "default-src 'self'; img-src 'self' data:; connect-src https:; font-src 'self' data:; frame-ancestors https://*.reddit.com",
64-
"permissions": [
65-
"https://*.reddit.com/*",
66-
"tabs",
67-
"history",
68-
"storage",
69-
"unlimitedStorage",
70-
"webRequest"
71-
],
72-
"optional_permissions": [
73-
"downloads",
74-
"geolocation",
75-
76-
"https://publish.twitter.com/oembed",
77-
"https://backend.deviantart.com/oembed",
78-
"https://api.gyazo.com/api/oembed",
79-
"https://api.tumblr.com/v2/blog/*/posts",
80-
"https://xkcd.com/*/info.0.json",
81-
"https://api.steampowered.com/ISteamRemoteStorage/GetPublishedFileDetails/*",
82-
"https://www.googleapis.com/drive/v3/*",
83-
"https://*.redd.it/*",
84-
"https://www.flickr.com/services/oembed",
85-
86-
"https://redditenhancementsuite.com/oauth",
87-
"https://accounts.google.com/signin/oauth",
88-
"https://www.dropbox.com/oauth2/authorize",
89-
"https://login.live.com/oauth20_authorize.srf"
90-
],
91-
"web_accessible_resources": [
92-
"prompt.html",
93-
"prompt.entry.js",
94-
"options.css",
95-
"options.html"
96-
]
97-
}
2+
"manifest_version": 3,
3+
"name": "__name__ - Beta",
4+
"version": "__version__",
5+
"description": "__description__",
6+
"author": "__author__",
7+
"homepage_url": "__homepage__",
8+
"minimum_chrome_version": "114",
9+
"icons": {
10+
"48": "icon48.png",
11+
"128": "icon128.png"
12+
},
13+
"action": {
14+
"default_icon": {
15+
"19": "css-on-small.png",
16+
"38": "css-on.png"
17+
}
18+
},
19+
"options_ui": {
20+
"page": "options.html",
21+
"open_in_tab": true
22+
},
23+
"background": {
24+
"service_worker": "background.entry.js"
25+
},
26+
"content_scripts": [
27+
{
28+
"matches": [
29+
"https://*.reddit.com/*"
30+
],
31+
"all_frames": true,
32+
"exclude_matches": [
33+
"https://mod.reddit.com/*",
34+
"https://ads.reddit.com/*",
35+
"https://i.reddit.com/*",
36+
"https://m.reddit.com/*",
37+
"https://static.reddit.com/*",
38+
"https://thumbs.reddit.com/*",
39+
"https://blog.reddit.com/*",
40+
"https://code.reddit.com/*",
41+
"https://about.reddit.com/*",
42+
"https://sh.reddit.com/*",
43+
"https://*.reddit.com/talk/*",
44+
"https://*.reddit.com/chat/*",
45+
"https://*.reddit.com/*.compact",
46+
"https://*.reddit.com/*.compact?*",
47+
"https://*.reddit.com/*.mobile",
48+
"https://*.reddit.com/*.mobile?*",
49+
"https://*.reddit.com/*.json",
50+
"https://*.reddit.com/*.json?*",
51+
"https://*.reddit.com/*.json-html",
52+
"https://*.reddit.com/*.json-html?*"
53+
],
54+
"js": [
55+
"foreground.entry.js"
56+
],
57+
"css": [
58+
"res.css"
59+
],
60+
"run_at": "document_start"
61+
}
62+
],
63+
"content_security_policy": {
64+
"extension_pages": "default-src 'self'; script-src 'self'; img-src 'self' data:; connect-src https:; font-src 'self' data:; frame-ancestors https://*.reddit.com; script-src-elem 'self'"
65+
},
66+
"permissions": [
67+
"tabs",
68+
"history",
69+
"storage",
70+
"unlimitedStorage",
71+
"webRequest",
72+
"scripting",
73+
"cookies",
74+
"identity",
75+
"geolocation"
76+
],
77+
"optional_permissions": [
78+
"downloads"
79+
],
80+
"host_permissions": [
81+
"https://*.reddit.com/*",
82+
"https://publish.twitter.com/oembed",
83+
"https://backend.deviantart.com/oembed",
84+
"https://api.gyazo.com/api/oembed",
85+
"https://api.tumblr.com/v2/blog/*/posts",
86+
"https://xkcd.com/*/info.0.json",
87+
"https://api.steampowered.com/ISteamRemoteStorage/GetPublishedFileDetails/*",
88+
"https://www.googleapis.com/drive/v3/*",
89+
"https://*.redd.it/*",
90+
"https://www.flickr.com/services/oembed",
91+
"https://redditenhancementsuite.com/oauth",
92+
"https://accounts.google.com/signin/oauth",
93+
"https://www.dropbox.com/oauth2/authorize",
94+
"https://login.live.com/oauth20_authorize.srf"
95+
],
96+
"web_accessible_resources": [
97+
{
98+
"resources": [
99+
"prompt.html",
100+
"prompt.entry.js",
101+
"options.css",
102+
"options.html"
103+
],
104+
"matches": [
105+
"https://*.reddit.com/*"
106+
]
107+
}
108+
]
109+
}

0 commit comments

Comments
 (0)