diff --git a/src/_locales/de/main.json b/src/_locales/de/main.json index 57fe8d1..ec45696 100644 --- a/src/_locales/de/main.json +++ b/src/_locales/de/main.json @@ -96,5 +96,6 @@ "Feature Pages": "Funktionsseiten", "Keyboard Shortcuts": "Tastenkombinationen", "Open Conversation Page": "Konversationsseite öffnen", + "Open Conversation Window": "Konversationsfenster öffnen", "Store to Independent Conversation Page": "Auf unabhängiger Konversationsseite speichern" } diff --git a/src/_locales/en/main.json b/src/_locales/en/main.json index 2355e49..1971957 100644 --- a/src/_locales/en/main.json +++ b/src/_locales/en/main.json @@ -96,5 +96,7 @@ "Feature Pages": "Feature Pages", "Keyboard Shortcuts": "Keyboard Shortcuts", "Open Conversation Page": "Open Conversation Page", - "Store to Independent Conversation Page": "Store to Independent Conversation Page" + "Open Conversation Window": "Open Conversation Window", + "Store to Independent Conversation Page": "Store to Independent Conversation Page", + "Keep Conversation Window in Background": "Keep conversation window in background, so that you can use shortcut keys to call it up in any program" } diff --git a/src/_locales/es/main.json b/src/_locales/es/main.json index 55a1d88..a0b6784 100644 --- a/src/_locales/es/main.json +++ b/src/_locales/es/main.json @@ -96,5 +96,6 @@ "Feature Pages": "Páginas de características", "Keyboard Shortcuts": "Atajos de teclado", "Open Conversation Page": "Abrir página de conversación independiente", + "Open Conversation Window": "Abrir la ventana de conversación independiente", "Store to Independent Conversation Page": "Guardar en página de conversación independiente" } diff --git a/src/_locales/fr/main.json b/src/_locales/fr/main.json index 21b68ae..1fdb02e 100644 --- a/src/_locales/fr/main.json +++ b/src/_locales/fr/main.json @@ -96,5 +96,6 @@ "Feature Pages": "Pages de fonctionnalités", "Keyboard Shortcuts": "Raccourcis clavier", "Open Conversation Page": "Ouvrir la page de conversation", + "Open Conversation Window": "Ouvrir la fenêtre de conversation", "Store to Independent Conversation Page": "Enregistrer sur une page de conversation indépendante" } diff --git a/src/_locales/it/main.json b/src/_locales/it/main.json index d50ea72..5e3d703 100644 --- a/src/_locales/it/main.json +++ b/src/_locales/it/main.json @@ -96,5 +96,6 @@ "Feature Pages": "Pagine delle funzionalità", "Keyboard Shortcuts": "Scorciatoie da tastiera", "Open Conversation Page": "Apri la pagina della conversazione", + "Open Conversation Window": "Apri la finestra di conversazione", "Store to Independent Conversation Page": "Salva alla pagina della conversazione indipendente" } diff --git a/src/_locales/ja/main.json b/src/_locales/ja/main.json index cd3bb51..f32fb4d 100644 --- a/src/_locales/ja/main.json +++ b/src/_locales/ja/main.json @@ -95,6 +95,7 @@ "Settings": "設定", "Feature Pages": "機能ページ", "Keyboard Shortcuts": "キーボードショートカット", - "Open Conversation Page": "独立した会話ページを開く", + "Open Conversation Page": "会話ページを開く", + "Open Conversation Window": "会話ウィンドウを開く", "Store to Independent Conversation Page": "独立した会話ページに保存" } diff --git a/src/_locales/ko/main.json b/src/_locales/ko/main.json index 4d697ab..f99ea8f 100644 --- a/src/_locales/ko/main.json +++ b/src/_locales/ko/main.json @@ -96,5 +96,6 @@ "Feature Pages": "기능 페이지", "Keyboard Shortcuts": "키보드 단축키 설정", "Open Conversation Page": "대화 페이지 열기", + "Open Conversation Window": "대화 창 열기", "Store to Independent Conversation Page": "독립적인 대화 페이지에 저장" } diff --git a/src/_locales/pt/main.json b/src/_locales/pt/main.json index 500ac35..3b624b3 100644 --- a/src/_locales/pt/main.json +++ b/src/_locales/pt/main.json @@ -96,5 +96,6 @@ "Feature Pages": "Páginas de Recursos", "Keyboard Shortcuts": "Atalhos de Teclado", "Open Conversation Page": "Abrir Página de Conversa", + "Open Conversation Window": "Abrir Janela de Conversa", "Store to Independent Conversation Page": "Armazenar em Página de Conversa Independente" } diff --git a/src/_locales/ru/main.json b/src/_locales/ru/main.json index 62c99b0..09f48bc 100644 --- a/src/_locales/ru/main.json +++ b/src/_locales/ru/main.json @@ -96,5 +96,6 @@ "Feature Pages": "Страницы функций", "Keyboard Shortcuts": "Горячие клавиши", "Open Conversation Page": "Открыть страницу бесед", + "Open Conversation Window": "Открыть окно бесед", "Store to Independent Conversation Page": "Хранить на странице независимых разговоров" } diff --git a/src/_locales/zh-hans/main.json b/src/_locales/zh-hans/main.json index 4529418..76adf50 100644 --- a/src/_locales/zh-hans/main.json +++ b/src/_locales/zh-hans/main.json @@ -96,5 +96,7 @@ "Feature Pages": "功能页", "Keyboard Shortcuts": "快捷键设置", "Open Conversation Page": "打开独立对话页", - "Store to Independent Conversation Page": "收纳到独立对话页" + "Open Conversation Window": "打开独立对话窗口", + "Store to Independent Conversation Page": "收纳到独立对话页", + "Keep Conversation Window in Background": "保持对话窗口在后台, 以便在任何程序中使用快捷键呼出" } diff --git a/src/_locales/zh-hant/main.json b/src/_locales/zh-hant/main.json index cc6ffd3..7da4ad1 100644 --- a/src/_locales/zh-hant/main.json +++ b/src/_locales/zh-hant/main.json @@ -96,5 +96,7 @@ "Feature Pages": "功能頁", "Keyboard Shortcuts": "快速鍵設定", "Open Conversation Page": "開啟獨立對話頁", - "Store to Independent Conversation Page": "收納到獨立對話頁" + "Open Conversation Window": "開啟獨立對話視窗", + "Store to Independent Conversation Page": "收納到獨立對話頁", + "Keep Conversation Window in Background": "保持對話窗口在後臺, 以便在任何程序中使用快捷鍵呼出" } diff --git a/src/content-script/menu-tools/index.mjs b/src/content-script/menu-tools/index.mjs index e5b01fa..15bb84b 100644 --- a/src/content-script/menu-tools/index.mjs +++ b/src/content-script/menu-tools/index.mjs @@ -21,4 +21,15 @@ export const config = { openUrl(Browser.runtime.getURL('IndependentPanel.html')) }, }, + openConversationWindow: { + label: 'Open Conversation Window', + action: async () => { + Browser.windows.create({ + url: Browser.runtime.getURL('IndependentPanel.html'), + type: 'popup', + width: 500, + height: 650, + }) + }, + }, } diff --git a/src/manifest.json b/src/manifest.json index 8b3d3e9..09d12b7 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -21,6 +21,9 @@ "unlimitedStorage", "tabs" ], + "optional_permissions": [ + "background" + ], "background": { "service_worker": "background.js" }, @@ -78,6 +81,9 @@ "mac": "MacCtrl+Shift+H" }, "description": "Open the independent conversation page" + }, + "openConversationWindow": { + "description": "Open the independent conversation window" } } } \ No newline at end of file diff --git a/src/manifest.v2.json b/src/manifest.v2.json index 500178f..d66c852 100644 --- a/src/manifest.v2.json +++ b/src/manifest.v2.json @@ -19,6 +19,9 @@ "https://*.openai.com/", "https://*.bing.com/" ], + "optional_permissions": [ + "background" + ], "background": { "scripts": [ "background.js" @@ -71,6 +74,9 @@ "mac": "MacCtrl+Shift+H" }, "description": "Open the independent conversation page" + }, + "openConversationWindow": { + "description": "Open the independent conversation window" } } } \ No newline at end of file diff --git a/src/popup/Popup.jsx b/src/popup/Popup.jsx index 4c26d2e..899ed64 100644 --- a/src/popup/Popup.jsx +++ b/src/popup/Popup.jsx @@ -297,9 +297,15 @@ GeneralPart.propTypes = { function FeaturePages() { const { t } = useTranslation() + const [backgroundPermission, setBackgroundPermission] = useState(false) + + if (!isMobile() && !isFirefox() && !isSafari()) + Browser.permissions.contains({ permissions: ['background'] }).then((result) => { + setBackgroundPermission(result) + }) return ( -
+
{!isMobile() && !isFirefox() && !isSafari() && ( + + {!isMobile() && !isFirefox() && !isSafari() && ( + + )}
) }