From 53f788925de04202ffa0ea46186869d012c774f3 Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Sun, 6 Nov 2022 11:22:05 -0500 Subject: [PATCH] Update for Edge build --- extension/chrome/manifest.json | 1 - extension/edge/manifest.json | 67 ++++++++++++++++++++ extension/src/options/EditorGroup.tsx | 2 +- extension/src/options/MiscellaneousGroup.tsx | 6 +- 4 files changed, 69 insertions(+), 7 deletions(-) create mode 100644 extension/edge/manifest.json diff --git a/extension/chrome/manifest.json b/extension/chrome/manifest.json index 449267a6..e37d37da 100644 --- a/extension/chrome/manifest.json +++ b/extension/chrome/manifest.json @@ -1,7 +1,6 @@ { "version": "3.0.11", "name": "Redux DevTools", - "short_name": "Redux DevTools", "description": "Redux DevTools for debugging application's state changes.", "homepage_url": "https://github.com/reduxjs/redux-devtools", "manifest_version": 2, diff --git a/extension/edge/manifest.json b/extension/edge/manifest.json new file mode 100644 index 00000000..4ef91ee1 --- /dev/null +++ b/extension/edge/manifest.json @@ -0,0 +1,67 @@ +{ + "version": "3.0.11", + "name": "Redux DevTools", + "description": "Redux DevTools for debugging application's state changes.", + "homepage_url": "https://github.com/reduxjs/redux-devtools", + "manifest_version": 2, + "page_action": { + "default_icon": "img/logo/gray.png", + "default_title": "Redux DevTools", + "default_popup": "window.html#popup" + }, + "commands": { + "devtools-left": { + "description": "DevTools window to left" + }, + "devtools-right": { + "description": "DevTools window to right" + }, + "devtools-bottom": { + "description": "DevTools window to bottom" + }, + "devtools-remote": { + "description": "Remote DevTools" + }, + "_execute_page_action": { + "suggested_key": { + "default": "Ctrl+Shift+E" + } + } + }, + "icons": { + "16": "img/logo/16x16.png", + "48": "img/logo/48x48.png", + "128": "img/logo/128x128.png" + }, + "options_ui": { + "page": "options.html", + "chrome_style": true + }, + "background": { + "scripts": ["background.bundle.js"], + "persistent": false + }, + "content_scripts": [ + { + "matches": [""], + "exclude_globs": ["https://www.google*"], + "js": ["content.bundle.js", "pagewrap.bundle.js"], + "run_at": "document_start", + "all_frames": true + } + ], + "devtools_page": "devtools.html", + "web_accessible_resources": ["page.bundle.js"], + "externally_connectable": { + "ids": ["*"] + }, + "permissions": [ + "notifications", + "contextMenus", + "storage", + "file:///*", + "http://*/*", + "https://*/*" + ], + "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'; style-src * 'unsafe-inline'; img-src 'self' data:;" +} diff --git a/extension/src/options/EditorGroup.tsx b/extension/src/options/EditorGroup.tsx index 130ef824..9b21097e 100644 --- a/extension/src/options/EditorGroup.tsx +++ b/extension/src/options/EditorGroup.tsx @@ -23,7 +23,7 @@ export default ({ options, saveOption }: OptionsProps) => { diff --git a/extension/src/options/MiscellaneousGroup.tsx b/extension/src/options/MiscellaneousGroup.tsx index 1c3c9a05..f1301d40 100644 --- a/extension/src/options/MiscellaneousGroup.tsx +++ b/extension/src/options/MiscellaneousGroup.tsx @@ -2,10 +2,6 @@ import React from 'react'; import { OptionsProps } from './Options'; export default ({ options, saveOption }: OptionsProps) => { - const browserName = navigator.userAgent.includes('Firefox') - ? 'Firefox' - : 'Chrome'; - return (
Miscellaneous @@ -46,7 +42,7 @@ export default ({ options, saveOption }: OptionsProps) => { Show errors
- Show the {browserName} notifications when errors occur in the app + Show the browser notifications when errors occur in the app