Skip to content

Commit

Permalink
Chrome Manifest v3 Support (#5403)
Browse files Browse the repository at this point in the history
Support MV3 for Chrome, FF will remain on MV2 with MV3 compat layer.

Tested in FF 123 and Chrome 122.
  • Loading branch information
benmcgarry authored Mar 2, 2024
1 parent 5069784 commit bb35be5
Show file tree
Hide file tree
Showing 4 changed files with 228 additions and 201 deletions.
204 changes: 108 additions & 96 deletions chrome/beta/manifest.json
Original file line number Diff line number Diff line change
@@ -1,97 +1,109 @@
{
"manifest_version": 2,
"name": "__name__",
"version": "__version__",
"description": "__description__",
"author": "__author__",
"homepage_url": "__homepage__",
"minimum_chrome_version": "114",
"icons": {
"48": "icon48.png",
"128": "icon128.png"
},
"page_action": {
"default_icon": {
"19": "css-on-small.png",
"38": "css-on.png"
}
},
"options_ui": {
"page": "options.html",
"open_in_tab": true
},
"background": {
"scripts": [
"background.entry.js"
]
},
"content_scripts": [{
"matches": [
"https://*.reddit.com/*"
],
"all_frames": true,
"exclude_matches": [
"https://mod.reddit.com/*",
"https://ads.reddit.com/*",
"https://i.reddit.com/*",
"https://m.reddit.com/*",
"https://static.reddit.com/*",
"https://thumbs.reddit.com/*",
"https://blog.reddit.com/*",
"https://code.reddit.com/*",
"https://about.reddit.com/*",
"https://sh.reddit.com/*",
"https://*.reddit.com/talk/*",
"https://*.reddit.com/chat/*",
"https://*.reddit.com/*.compact",
"https://*.reddit.com/*.compact?*",
"https://*.reddit.com/*.mobile",
"https://*.reddit.com/*.mobile?*",
"https://*.reddit.com/*.json",
"https://*.reddit.com/*.json?*",
"https://*.reddit.com/*.json-html",
"https://*.reddit.com/*.json-html?*"
],
"js": [
"foreground.entry.js"
],
"css": [
"res.css"
],
"run_at": "document_start"
}],
"content_security_policy": "default-src 'self'; img-src 'self' data:; connect-src https:; font-src 'self' data:; frame-ancestors https://*.reddit.com",
"permissions": [
"https://*.reddit.com/*",
"tabs",
"history",
"storage",
"unlimitedStorage",
"webRequest"
],
"optional_permissions": [
"downloads",
"geolocation",

"https://publish.twitter.com/oembed",
"https://backend.deviantart.com/oembed",
"https://api.gyazo.com/api/oembed",
"https://api.tumblr.com/v2/blog/*/posts",
"https://xkcd.com/*/info.0.json",
"https://api.steampowered.com/ISteamRemoteStorage/GetPublishedFileDetails/*",
"https://www.googleapis.com/drive/v3/*",
"https://*.redd.it/*",
"https://www.flickr.com/services/oembed",

"https://redditenhancementsuite.com/oauth",
"https://accounts.google.com/signin/oauth",
"https://www.dropbox.com/oauth2/authorize",
"https://login.live.com/oauth20_authorize.srf"
],
"web_accessible_resources": [
"prompt.html",
"prompt.entry.js",
"options.css",
"options.html"
]
}
"manifest_version": 3,
"name": "__name__ - Beta",
"version": "__version__",
"description": "__description__",
"author": "__author__",
"homepage_url": "__homepage__",
"minimum_chrome_version": "114",
"icons": {
"48": "icon48.png",
"128": "icon128.png"
},
"action": {
"default_icon": {
"19": "css-on-small.png",
"38": "css-on.png"
}
},
"options_ui": {
"page": "options.html",
"open_in_tab": true
},
"background": {
"service_worker": "background.entry.js"
},
"content_scripts": [
{
"matches": [
"https://*.reddit.com/*"
],
"all_frames": true,
"exclude_matches": [
"https://mod.reddit.com/*",
"https://ads.reddit.com/*",
"https://i.reddit.com/*",
"https://m.reddit.com/*",
"https://static.reddit.com/*",
"https://thumbs.reddit.com/*",
"https://blog.reddit.com/*",
"https://code.reddit.com/*",
"https://about.reddit.com/*",
"https://sh.reddit.com/*",
"https://*.reddit.com/talk/*",
"https://*.reddit.com/chat/*",
"https://*.reddit.com/*.compact",
"https://*.reddit.com/*.compact?*",
"https://*.reddit.com/*.mobile",
"https://*.reddit.com/*.mobile?*",
"https://*.reddit.com/*.json",
"https://*.reddit.com/*.json?*",
"https://*.reddit.com/*.json-html",
"https://*.reddit.com/*.json-html?*"
],
"js": [
"foreground.entry.js"
],
"css": [
"res.css"
],
"run_at": "document_start"
}
],
"content_security_policy": {
"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'"
},
"permissions": [
"tabs",
"history",
"storage",
"unlimitedStorage",
"webRequest",
"scripting",
"cookies",
"identity",
"geolocation"
],
"optional_permissions": [
"downloads"
],
"host_permissions": [
"https://*.reddit.com/*",
"https://publish.twitter.com/oembed",
"https://backend.deviantart.com/oembed",
"https://api.gyazo.com/api/oembed",
"https://api.tumblr.com/v2/blog/*/posts",
"https://xkcd.com/*/info.0.json",
"https://api.steampowered.com/ISteamRemoteStorage/GetPublishedFileDetails/*",
"https://www.googleapis.com/drive/v3/*",
"https://*.redd.it/*",
"https://www.flickr.com/services/oembed",
"https://redditenhancementsuite.com/oauth",
"https://accounts.google.com/signin/oauth",
"https://www.dropbox.com/oauth2/authorize",
"https://login.live.com/oauth20_authorize.srf"
],
"web_accessible_resources": [
{
"resources": [
"prompt.html",
"prompt.entry.js",
"options.css",
"options.html"
],
"matches": [
"https://*.reddit.com/*"
]
}
]
}
Loading

0 comments on commit bb35be5

Please sign in to comment.