From 9d63a39936140e11db11299bfb858b5d7aaae68c Mon Sep 17 00:00:00 2001 From: josc146 Date: Tue, 6 Aug 2024 14:03:30 +0800 Subject: [PATCH] improve user experience for claude.ai and kimi.moonshot.cn --- src/_locales/de/main.json | 7 +- src/_locales/en/main.json | 7 +- src/_locales/es/main.json | 7 +- src/_locales/fr/main.json | 7 +- src/_locales/in/main.json | 7 +- src/_locales/it/main.json | 7 +- src/_locales/ja/main.json | 7 +- src/_locales/ko/main.json | 7 +- src/_locales/pt/main.json | 7 +- src/_locales/ru/main.json | 7 +- src/_locales/tr/main.json | 7 +- src/_locales/zh-hans/main.json | 5 +- src/_locales/zh-hant/main.json | 7 +- src/background/index.mjs | 8 +- src/components/MarkdownRender/Hyperlink.jsx | 6 +- .../index.jsx | 46 ++++++----- src/config/index.mjs | 2 +- src/content-script/index.jsx | 78 ++++++++++++++++--- src/services/apis/moonshot-web.mjs | 4 +- src/services/wrappers.mjs | 4 +- 20 files changed, 162 insertions(+), 75 deletions(-) rename src/components/{NotificationForChatGPTWeb => WebJumpBackNotification}/index.jsx (62%) diff --git a/src/_locales/de/main.json b/src/_locales/de/main.json index 0b9bbc7..704be04 100644 --- a/src/_locales/de/main.json +++ b/src/_locales/de/main.json @@ -44,7 +44,7 @@ "Save Conversation": "Konversation speichern", "UNAUTHORIZED": "Unbefugt", "Please login at https://chatgpt.com first": "Bitte zuerst bei https://chatgpt.com anmelden", - "Please login at https://claude.ai first": "Bitte zuerst bei https://claude.ai anmelden", + "Please login at https://claude.ai first, and then click the retry button": "Bitte zuerst bei https://claude.ai anmelden und dann auf die Schaltfläche Wiederholen klicken", "Please login at https://bing.com first": "Bitte zuerst bei https://bing.com anmelden", "Then open https://chatgpt.com/api/auth/session": "Dann öffne https://chatgpt.com/api/auth/session", "And refresh this page or type you question again": "Klicken Sie anschließend auf die Schaltfläche Wiederholen in der oberen rechten Ecke", @@ -131,7 +131,7 @@ "Please keep https://chatgpt.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "Bitte halten Sie https://chatgpt.com geöffnet und versuchen Sie es erneut. Wenn es immer noch nicht funktioniert, geben Sie einige Zeichen in das Eingabefeld der ChatGPT-Webseite ein und versuchen Sie es erneut.", "Open Side Panel": "Seitenleiste öffnen", "Generating...": "Generieren...", - "moonshot token required, please login at https://kimi.moonshot.cn first": "Moonshot-Token erforderlich, bitte zuerst bei https://kimi.moonshot.cn anmelden", + "moonshot token required, please login at https://kimi.moonshot.cn first, and then click the retry button": "Moonshot-Token erforderlich, bitte zuerst bei https://kimi.moonshot.cn anmelden und dann auf die Schaltfläche Wiederholen klicken", "Hide context menu of this extension": "Kontextmenü dieser Erweiterung ausblenden", "Custom Claude API Url": "Benutzerdefinierte Claude-API-URL", "Cancel": "Abbrechen", @@ -150,5 +150,6 @@ "Keep-Alive Time": "Keep-Alive-Zeit", "5m": "5m", "30m": "30m", - "Forever": "Für immer" + "Forever": "Für immer", + "You have successfully logged in for ChatGPTBox and can now return": "Sie haben sich erfolgreich für ChatGPTBox angemeldet und können jetzt zurückkehren" } diff --git a/src/_locales/en/main.json b/src/_locales/en/main.json index 2b7d997..351d031 100644 --- a/src/_locales/en/main.json +++ b/src/_locales/en/main.json @@ -44,7 +44,7 @@ "Save Conversation": "Save Conversation", "UNAUTHORIZED": "UNAUTHORIZED", "Please login at https://chatgpt.com first": "Please login at https://chatgpt.com first", - "Please login at https://claude.ai first": "Please login at https://claude.ai first", + "Please login at https://claude.ai first, and then click the retry button": "Please login at https://claude.ai first, and then click the retry button", "Please login at https://bing.com first": "Please login at https://bing.com first", "Then open https://chatgpt.com/api/auth/session": "Then open https://chatgpt.com/api/auth/session", "And refresh this page or type you question again": "And click the retry button in the top right corner", @@ -131,7 +131,7 @@ "Please keep https://chatgpt.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "Please keep https://chatgpt.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.", "Open Side Panel": "Open Side Panel", "Generating...": "Generating...", - "moonshot token required, please login at https://kimi.moonshot.cn first": "moonshot token required, please login at https://kimi.moonshot.cn first", + "moonshot token required, please login at https://kimi.moonshot.cn first, and then click the retry button": "moonshot token required, please login at https://kimi.moonshot.cn first, and then click the retry button", "Hide context menu of this extension": "Hide context menu of this extension", "Custom Claude API Url": "Custom Claude API Url", "Cancel": "Cancel", @@ -150,5 +150,6 @@ "Keep-Alive Time": "Keep-Alive Time", "5m": "5m", "30m": "30m", - "Forever": "Forever" + "Forever": "Forever", + "You have successfully logged in for ChatGPTBox and can now return": "You have successfully logged in for ChatGPTBox and can now return" } diff --git a/src/_locales/es/main.json b/src/_locales/es/main.json index 6055a76..34638c4 100644 --- a/src/_locales/es/main.json +++ b/src/_locales/es/main.json @@ -44,7 +44,7 @@ "Save Conversation": "Guardar conversación", "UNAUTHORIZED": "NO AUTORIZADO", "Please login at https://chatgpt.com first": "Por favor, inicie sesión en https://chatgpt.com primero", - "Please login at https://claude.ai first": "Por favor, inicie sesión en https://claude.ai primero", + "Please login at https://claude.ai first, and then click the retry button": "Por favor, inicie sesión en https://claude.ai primero, y luego haga clic en el botón Reintentar", "Please login at https://bing.com first": "Por favor, inicie sesión en https://bing.com primero", "Then open https://chatgpt.com/api/auth/session": "Luego abra https://chatgpt.com/api/auth/session", "And refresh this page or type you question again": "A continuación, pulse el botón Reintentar situado en la esquina superior derecha.", @@ -131,7 +131,7 @@ "Please keep https://chatgpt.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "Por favor, mantenga https://chatgpt.com abierto e inténtelo de nuevo. Si aún no funciona, escriba algunos caracteres en el cuadro de entrada de la página web de chatgpt e inténtelo de nuevo.", "Open Side Panel": "Abrir panel lateral", "Generating...": "Generando...", - "moonshot token required, please login at https://kimi.moonshot.cn first": "se requiere un token de moonshot, por favor inicie sesión en https://kimi.moonshot.cn primero", + "moonshot token required, please login at https://kimi.moonshot.cn first, and then click the retry button": "se requiere un token de moonshot, por favor inicie sesión en https://kimi.moonshot.cn primero, y luego haga clic en el botón Reintentar", "Hide context menu of this extension": "Ocultar menú contextual de esta extensión", "Custom Claude API Url": "URL personalizada de la API de Claude", "Cancel": "Cancelar", @@ -150,5 +150,6 @@ "Keep-Alive Time": "Tiempo de mantenimiento de la conexión", "5m": "5m", "30m": "30m", - "Forever": "Siempre" + "Forever": "Siempre", + "You have successfully logged in for ChatGPTBox and can now return": "Ha iniciado sesión correctamente en ChatGPTBox y ahora puede regresar" } diff --git a/src/_locales/fr/main.json b/src/_locales/fr/main.json index 7727d15..7875eb4 100644 --- a/src/_locales/fr/main.json +++ b/src/_locales/fr/main.json @@ -44,7 +44,7 @@ "Save Conversation": "Enregistrer la conversation", "UNAUTHORIZED": "NON AUTORISÉ", "Please login at https://chatgpt.com first": "Veuillez vous connecter d'abord sur https://chatgpt.com", - "Please login at https://claude.ai first": "Veuillez vous connecter d'abord sur https://claude.ai", + "Please login at https://claude.ai first, and then click the retry button": "Veuillez vous connecter d'abord sur https://claude.ai, puis cliquez sur le bouton Réessayer", "Please login at https://bing.com first": "Veuillez vous connecter d'abord sur https://bing.com", "Then open https://chatgpt.com/api/auth/session": "Puis ouvrez https://chatgpt.com/api/auth/session", "And refresh this page or type you question again": "Cliquez ensuite sur le bouton Réessayer dans le coin supérieur droit", @@ -131,7 +131,7 @@ "Please keep https://chatgpt.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "Veuillez garder https://chatgpt.com ouvert et réessayer. Si cela ne fonctionne toujours pas, tapez quelques caractères dans la boîte de saisie de la page web chatgpt et réessayez.", "Open Side Panel": "Ouvrir le panneau latéral", "Generating...": "Génération...", - "moonshot token required, please login at https://kimi.moonshot.cn first": "jeton moonshot requis, veuillez vous connecter d'abord sur https://kimi.moonshot.cn", + "moonshot token required, please login at https://kimi.moonshot.cn first, and then click the retry button": "jeton moonshot requis, veuillez vous connecter d'abord sur https://kimi.moonshot.cn, puis cliquez sur le bouton Réessayer", "Hide context menu of this extension": "Masquer le menu contextuel de cette extension", "Custom Claude API Url": "URL API Claude personnalisée", "Cancel": "Annuler", @@ -150,5 +150,6 @@ "Keep-Alive Time": "Temps de maintien de la connexion", "5m": "5m", "30m": "30m", - "Forever": "Toujours" + "Forever": "Toujours", + "You have successfully logged in for ChatGPTBox and can now return": "Vous vous êtes connecté avec succès à ChatGPTBox et pouvez maintenant revenir" } diff --git a/src/_locales/in/main.json b/src/_locales/in/main.json index 045acc0..7238d8f 100644 --- a/src/_locales/in/main.json +++ b/src/_locales/in/main.json @@ -44,7 +44,7 @@ "Save Conversation": "Simpan Percakapan", "UNAUTHORIZED": "TIDAK DIIZINKAN", "Please login at https://chatgpt.com first": "Silakan masuk di https://chatgpt.com terlebih dahulu", - "Please login at https://claude.ai first": "Silakan masuk di https://claude.ai terlebih dahulu", + "Please login at https://claude.ai first, and then click the retry button": "Silakan masuk di https://claude.ai terlebih dahulu, lalu klik tombol coba lagi", "Please login at https://bing.com first": "Silakan masuk di https://bing.com terlebih dahulu", "Then open https://chatgpt.com/api/auth/session": "Lalu buka https://chatgpt.com/api/auth/session", "And refresh this page or type you question again": "Setelah itu klik tombol Coba Lagi di sudut kanan atas", @@ -131,7 +131,7 @@ "Please keep https://chatgpt.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "Harap tetap buka https://chatgpt.com dan coba lagi. Jika masih tidak berhasil, ketik beberapa karakter di kotak masukan halaman web chatgpt dan coba lagi.", "Open Side Panel": "Buka Panel Samping", "Generating...": "Menghasilkan...", - "moonshot token required, please login at https://kimi.moonshot.cn first": "diperlukan token moonshot, silakan masuk di https://kimi.moonshot.cn terlebih dahulu", + "moonshot token required, please login at https://kimi.moonshot.cn first, and then click the retry button": "diperlukan token moonshot, silakan masuk di https://kimi.moonshot.cn terlebih dahulu, lalu klik tombol coba lagi", "Hide context menu of this extension": "Sembunyikan menu konteks ekstensi ini", "Custom Claude API Url": "URL API Claude Kustom", "Cancel": "Batal", @@ -150,5 +150,6 @@ "Keep-Alive Time": "Waktu Tetap Hidup", "5m": "5m", "30m": "30m", - "Forever": "Selamanya" + "Forever": "Selamanya", + "You have successfully logged in for ChatGPTBox and can now return": "Anda telah berhasil masuk untuk ChatGPTBox dan sekarang dapat kembali" } diff --git a/src/_locales/it/main.json b/src/_locales/it/main.json index e48b55b..46058fa 100644 --- a/src/_locales/it/main.json +++ b/src/_locales/it/main.json @@ -44,7 +44,7 @@ "Save Conversation": "Salva la conversazione", "UNAUTHORIZED": "Non autorizzato", "Please login at https://chatgpt.com first": "Effettua il login su https://chatgpt.com prima", - "Please login at https://claude.ai first": "Effettua il login su https://claude.ai prima", + "Please login at https://claude.ai first, and then click the retry button": "Effettua il login su https://claude.ai prima, quindi fai clic sul pulsante Riprova", "Please login at https://bing.com first": "Effettua il login su https://bing.com prima", "Then open https://chatgpt.com/api/auth/session": "Quindi apri https://chatgpt.com/api/auth/session", "And refresh this page or type you question again": "Quindi fare clic sul pulsante Riprova nell'angolo in alto a destra", @@ -131,7 +131,7 @@ "Please keep https://chatgpt.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "Per favore, mantieni aperto https://chatgpt.com e riprova. Se ancora non funziona, digita alcuni caratteri nella casella di input della pagina web di chatgpt e riprova.", "Open Side Panel": "Apri il pannello laterale", "Generating...": "Generazione...", - "moonshot token required, please login at https://kimi.moonshot.cn first": "richiesto token moonshot, effettua il login su https://kimi.moonshot.cn prima", + "moonshot token required, please login at https://kimi.moonshot.cn first, and then click the retry button": "richiesto token moonshot, effettua il login su https://kimi.moonshot.cn prima, quindi fai clic sul pulsante Riprova", "Hide context menu of this extension": "Nascondi il menu contestuale di questa estensione", "Custom Claude API Url": "URL API Claude personalizzato", "Cancel": "Annulla", @@ -150,5 +150,6 @@ "Keep-Alive Time": "Tempo di mantenimento", "5m": "5m", "30m": "30m", - "Forever": "Per sempre" + "Forever": "Per sempre", + "You have successfully logged in for ChatGPTBox and can now return": "Ti sei autenticato con successo per ChatGPTBox e ora puoi tornare" } diff --git a/src/_locales/ja/main.json b/src/_locales/ja/main.json index 3137c30..1bc3c32 100644 --- a/src/_locales/ja/main.json +++ b/src/_locales/ja/main.json @@ -44,7 +44,7 @@ "Save Conversation": "会話を保存", "UNAUTHORIZED": "認証されていません", "Please login at https://chatgpt.com first": "最初に https://chatgpt.com にログインしてください", - "Please login at https://claude.ai first": "最初に https://claude.ai にログインしてください", + "Please login at https://claude.ai first, and then click the retry button": "最初に https://claude.ai にログインしてから、再試行ボタンをクリックしてください", "Please login at https://bing.com first": "最初に https://bing.com にログインしてください", "Then open https://chatgpt.com/api/auth/session": "次に https://chatgpt.com/api/auth/session にアクセス", "And refresh this page or type you question again": "次に、右上の「再試行」ボタンをクリックします", @@ -131,7 +131,7 @@ "Please keep https://chatgpt.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "https://chatgpt.com を開いたままにして、もう一度試してください。それでもうまくいかない場合は、chatgpt webページの入力ボックスにいくつかの文字を入力してからもう一度試してください。", "Open Side Panel": "サイドパネルを開く", "Generating...": "生成中...", - "moonshot token required, please login at https://kimi.moonshot.cn first": "moonshotトークンが必要です。最初に https://kimi.moonshot.cn にログインしてください", + "moonshot token required, please login at https://kimi.moonshot.cn first, and then click the retry button": "moonshotトークンが必要です。最初に https://kimi.moonshot.cn にログインしてから、再試行ボタンをクリックしてください", "Hide context menu of this extension": "この拡張機能のコンテキストメニューを非表示", "Custom Claude API Url": "カスタムClaude APIのURL", "Cancel": "キャンセル", @@ -150,5 +150,6 @@ "Keep-Alive Time": "Keep-Alive時間", "5m": "5分", "30m": "30分", - "Forever": "永久" + "Forever": "永久", + "You have successfully logged in for ChatGPTBox and can now return": "ChatGPTBoxに正常にログインしました。これで戻ることができます" } diff --git a/src/_locales/ko/main.json b/src/_locales/ko/main.json index 56cca92..dccb7c6 100644 --- a/src/_locales/ko/main.json +++ b/src/_locales/ko/main.json @@ -44,7 +44,7 @@ "Save Conversation": "대화 저장", "UNAUTHORIZED": "인증되지 않음", "Please login at https://chatgpt.com first": "https://chatgpt.com 에서 로그인하세요.", - "Please login at https://claude.ai first": "https://claude.ai 에서 로그인하세요.", + "Please login at https://claude.ai first, and then click the retry button": "https://claude.ai 에서 로그인한 다음 재시도 버튼을 클릭하세요.", "Please login at https://bing.com first": "https://bing.com 에서 로그인하세요.", "Then open https://chatgpt.com/api/auth/session": "그런 다음 https://chatgpt.com/api/auth/session 을 열거나 다시 질문을 입력하세요.", "And refresh this page or type you question again": "그런 다음 오른쪽 상단의 재시도 버튼을 클릭합니다.", @@ -131,7 +131,7 @@ "Please keep https://chatgpt.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "https://chatgpt.com 을 열어두고 다시 시도하세요. 여전히 작동하지 않으면 chatgpt 웹 페이지의 입력 상자에 몇 가지 문자를 입력한 다음 다시 시도하세요.", "Open Side Panel": "사이드 패널 열기", "Generating...": "생성 중...", - "moonshot token required, please login at https://kimi.moonshot.cn first": "moonshot 토큰이 필요합니다. https://kimi.moonshot.cn 에서 로그인하세요.", + "moonshot token required, please login at https://kimi.moonshot.cn first, and then click the retry button": "moonshot 토큰이 필요합니다. https://kimi.moonshot.cn 에서 로그인한 다음 재시도 버튼을 클릭하세요.", "Hide context menu of this extension": "이 확장 프로그램의 컨텍스트 메뉴 숨기기", "Custom Claude API Url": "사용자 정의 Claude API URL", "Cancel": "취소", @@ -150,5 +150,6 @@ "Keep-Alive Time": "Keep-Alive 시간", "5m": "5분", "30m": "30분", - "Forever": "영원히" + "Forever": "영원히", + "You have successfully logged in for ChatGPTBox and can now return": "ChatGPTBox에 성공적으로 로그인하였으며 이제 돌아갈 수 있습니다" } diff --git a/src/_locales/pt/main.json b/src/_locales/pt/main.json index c88971e..290e81b 100644 --- a/src/_locales/pt/main.json +++ b/src/_locales/pt/main.json @@ -44,7 +44,7 @@ "Save Conversation": "Salvar Conversa", "UNAUTHORIZED": "NÃO AUTORIZADO", "Please login at https://chatgpt.com first": "Por favor, faça login em https://chatgpt.com primeiro", - "Please login at https://claude.ai first": "Por favor, faça login em https://claude.ai primeiro", + "Please login at https://claude.ai first, and then click the retry button": "Por favor, faça login em https://claude.ai primeiro e depois clique no botão de tentar novamente", "Please login at https://bing.com first": "Por favor, faça login em https://bing.com primeiro", "Then open https://chatgpt.com/api/auth/session": "Então, abra https://chatgpt.com/api/auth/session", "And refresh this page or type you question again": "Depois clique no botão Retry, no canto superior direito", @@ -131,7 +131,7 @@ "Please keep https://chatgpt.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "Por favor, mantenha https://chatgpt.com aberto e tente novamente. Se ainda não funcionar, digite alguns caracteres na caixa de entrada da página da web do chatgpt e tente novamente.", "Open Side Panel": "Abrir Painel Lateral", "Generating...": "Gerando...", - "moonshot token required, please login at https://kimi.moonshot.cn first": "token moonshot necessário, por favor faça login em https://kimi.moonshot.cn primeiro", + "moonshot token required, please login at https://kimi.moonshot.cn first, and then click the retry button": "token moonshot necessário, faça login em https://kimi.moonshot.cn primeiro e depois clique no botão de tentar novamente", "Hide context menu of this extension": "Ocultar menu de contexto desta extensão", "Custom Claude API Url": "URL da API Personalizada do Claude", "Cancel": "Cancelar", @@ -150,5 +150,6 @@ "Keep-Alive Time": "Tempo de Manutenção de Conexão", "5m": "5m", "30m": "30m", - "Forever": "Para sempre" + "Forever": "Para sempre", + "You have successfully logged in for ChatGPTBox and can now return": "Você fez login com sucesso no ChatGPTBox e agora pode voltar" } diff --git a/src/_locales/ru/main.json b/src/_locales/ru/main.json index ec4e06c..9dd537c 100644 --- a/src/_locales/ru/main.json +++ b/src/_locales/ru/main.json @@ -44,7 +44,7 @@ "Save Conversation": "Сохранить разговор", "UNAUTHORIZED": "Несанкционированный", "Please login at https://chatgpt.com first": "Пожалуйста, сначала войдите на https://chatgpt.com", - "Please login at https://claude.ai first": "Пожалуйста, сначала войдите на https://claude.ai", + "Please login at https://claude.ai first, and then click the retry button": "Пожалуйста, сначала войдите на https://claude.ai, а затем нажмите кнопку повтора", "Please login at https://bing.com first": "Пожалуйста, сначала войдите на https://bing.com", "Then open https://chatgpt.com/api/auth/session": "Затем откройте https://chatgpt.com/api/auth/session", "And refresh this page or type you question again": "После этого нажмите кнопку Retry в правом верхнем углу", @@ -131,7 +131,7 @@ "Please keep https://chatgpt.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "Пожалуйста, оставьте открытым https://chatgpt.com и попробуйте еще раз. Если это все еще не работает, введите несколько символов в поле ввода веб-страницы chatgpt и попробуйте еще раз.", "Open Side Panel": "Открыть боковую панель", "Generating...": "Генерация...", - "moonshot token required, please login at https://kimi.moonshot.cn first": "требуется токен moonshot, пожалуйста, сначала войдите на https://kimi.moonshot.cn", + "moonshot token required, please login at https://kimi.moonshot.cn first, and then click the retry button": "требуется токен moonshot, пожалуйста, сначала войдите на https://kimi.moonshot.cn, а затем нажмите кнопку повтора", "Hide context menu of this extension": "Скрыть контекстное меню этого расширения", "Custom Claude API Url": "Пользовательский URL API Claude", "Cancel": "Отмена", @@ -150,5 +150,6 @@ "Keep-Alive Time": "Время поддержания активности", "5m": "5m", "30m": "30m", - "Forever": "Вечно" + "Forever": "Вечно", + "You have successfully logged in for ChatGPTBox and can now return": "Вы успешно вошли в ChatGPTBox и теперь можете вернуться" } diff --git a/src/_locales/tr/main.json b/src/_locales/tr/main.json index 68ea5bd..20b56ad 100644 --- a/src/_locales/tr/main.json +++ b/src/_locales/tr/main.json @@ -44,7 +44,7 @@ "Save Conversation": "Konuşmayı Kaydet", "UNAUTHORIZED": "Yetkilendirilmemiş", "Please login at https://chatgpt.com first": "Lütfen önce https://chatgpt.com adresinde oturum açın", - "Please login at https://claude.ai first": "Lütfen önce https://claude.ai adresinde oturum açın", + "Please login at https://claude.ai first, and then click the retry button": "Lütfen önce https://claude.ai adresinde oturum açın ve ardından yeniden dene düğmesine tıklayın", "Please login at https://bing.com first": "Lütfen önce https://bing.com adresinde oturum açın", "Then open https://chatgpt.com/api/auth/session": "Ardından https://chatgpt.com/api/auth/session adresini açın", "And refresh this page or type you question again": "Ve bu sayfayı yenileyin veya sorunuzu tekrar yazın", @@ -131,7 +131,7 @@ "Please keep https://chatgpt.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "Lütfen https://chatgpt.com adresini açık tutun ve tekrar deneyin. Hala çalışmazsa, chatgpt web sayfasının girdi kutusuna bazı karakterler yazın ve tekrar deneyin.", "Open Side Panel": "Yan Paneli Aç", "Generating...": "Üretiliyor...", - "moonshot token required, please login at https://kimi.moonshot.cn first": "moonshot jetonu gerekiyor, lütfen önce https://kimi.moonshot.cn adresinde oturum açın", + "moonshot token required, please login at https://kimi.moonshot.cn first, and then click the retry button": "moonshot jetonu gereklidir, lütfen önce https://kimi.moonshot.cn adresinde oturum açın ve ardından yeniden dene düğmesine tıklayın", "Hide context menu of this extension": "Bu uzantının bağlam menüsünü gizle", "Custom Claude API Url": "Özel Claude API Url'si", "Cancel": "İptal", @@ -150,5 +150,6 @@ "Keep-Alive Time": "Canlı Tutma Süresi", "5m": "5m", "30m": "30m", - "Forever": "Sonsuza dek" + "Forever": "Sonsuza dek", + "You have successfully logged in for ChatGPTBox and can now return": "ChatGPTBox için başarıyla giriş yaptınız ve şimdi geri dönebilirsiniz" } diff --git a/src/_locales/zh-hans/main.json b/src/_locales/zh-hans/main.json index bb7a144..5ee9d7a 100644 --- a/src/_locales/zh-hans/main.json +++ b/src/_locales/zh-hans/main.json @@ -44,7 +44,7 @@ "Save Conversation": "保存对话", "UNAUTHORIZED": "未授权", "Please login at https://chatgpt.com first": "请先登录 https://chatgpt.com", - "Please login at https://claude.ai first": "请先登录 https://claude.ai", + "Please login at https://claude.ai first, and then click the retry button": "请先登录 https://claude.ai, 然后点击重试按钮", "Please login at https://bing.com first": "请先登录 https://bing.com", "Then open https://chatgpt.com/api/auth/session": "然后打开 https://chatgpt.com/api/auth/session", "And refresh this page or type you question again": "之后点击右上角的重试按钮", @@ -131,7 +131,7 @@ "Please keep https://chatgpt.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "请保持 https://chatgpt.com 打开并重试. 如果仍然不起作用, 请在chatgpt网页的输入框中输入一些字符, 然后再试一次.", "Open Side Panel": "打开侧边栏", "Generating...": "正在生成...", - "moonshot token required, please login at https://kimi.moonshot.cn first": "需要moonshot token, 请先登录 https://kimi.moonshot.cn", + "moonshot token required, please login at https://kimi.moonshot.cn first, and then click the retry button": "请先登录Kimi: https://kimi.moonshot.cn, 然后点击重试按钮", "Hide context menu of this extension": "隐藏此扩展的右键菜单", "Custom Claude API Url": "自定义的Claude API地址", "Cancel": "取消", @@ -151,6 +151,7 @@ "5m": "5分钟", "30m": "半小时", "Forever": "永久", + "You have successfully logged in for ChatGPTBox and can now return": "你已成功为ChatGPTBox登录,现在可以返回", "Kimi.Moonshot (Web, 100k)": "Kimi.Moonshot (网页版, 100k)", "ChatGLM (GLM-4-Air, 128k)": "ChatGLM (GLM4Air, 性价比, 128k)", "ChatGLM (GLM-4-0520, 128k)": "ChatGLM (GLM4-0520, 最智能, 128k)", diff --git a/src/_locales/zh-hant/main.json b/src/_locales/zh-hant/main.json index 65246ab..e7716cb 100644 --- a/src/_locales/zh-hant/main.json +++ b/src/_locales/zh-hant/main.json @@ -44,7 +44,7 @@ "Save Conversation": "儲存對話", "UNAUTHORIZED": "未授權", "Please login at https://chatgpt.com first": "請先在 https://chatgpt.com 登入", - "Please login at https://claude.ai first": "請先在 https://claude.ai 登入", + "Please login at https://claude.ai first, and then click the retry button": "請先在 https://claude.ai 登入,然後點擊重試按鈕", "Please login at https://bing.com first": "請先在 https://bing.com 登入", "Then open https://chatgpt.com/api/auth/session": "然後開啟 https://chatgpt.com/api/auth/session", "And refresh this page or type you question again": "接著點擊右上角的「重試」按鈕", @@ -131,7 +131,7 @@ "Please keep https://chatgpt.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.": "請保持 https://chatgpt.com 開啟並重試,如果還是無法通過驗證,請在 ChatGPT 網頁版輸入框輸入一些文字後再重試", "Open Side Panel": "開啟側邊面板", "Generating...": "產生中...", - "moonshot token required, please login at https://kimi.moonshot.cn first": "需要 moonshot token,請先在 https://kimi.moonshot.cn 登入", + "moonshot token required, please login at https://kimi.moonshot.cn first, and then click the retry button": "需要 moonshot token,請先在 https://kimi.moonshot.cn 登入,然後點擊重試按鈕", "Hide context menu of this extension": "隱藏此擴充功能的右鍵選單", "Custom Claude API Url": "自訂 Claude API 網址", "Cancel": "取消", @@ -150,5 +150,6 @@ "Keep-Alive Time": "保持連線時間", "5m": "5 分鐘", "30m": "30 分鐘", - "Forever": "永遠" + "Forever": "永遠", + "You have successfully logged in for ChatGPTBox and can now return": "您已成功為ChatGPTBox登入,現在可以返回" } diff --git a/src/background/index.mjs b/src/background/index.mjs index 2639c70..c3579d4 100644 --- a/src/background/index.mjs +++ b/src/background/index.mjs @@ -195,10 +195,9 @@ Browser.runtime.onMessage.addListener(async (message, sender) => { url: message.data.url, pinned: message.data.pinned, }) - if (message.data.saveAsChatgptConfig) { + if (message.data.jumpBack) { await setUserConfig({ - chatgptTabId: newTab.id, - chatgptJumpBackTabId: sender.tab.id, + notificationJumpBackTabId: sender.tab.id, }) } break @@ -266,6 +265,9 @@ Browser.runtime.onMessage.addListener(async (message, sender) => { return [null, error] } } + case 'GET_COOKIE': { + return (await Browser.cookies.get({ url: message.data.url, name: message.data.name }))?.value + } } }) diff --git a/src/components/MarkdownRender/Hyperlink.jsx b/src/components/MarkdownRender/Hyperlink.jsx index 6805590..bd5101e 100644 --- a/src/components/MarkdownRender/Hyperlink.jsx +++ b/src/components/MarkdownRender/Hyperlink.jsx @@ -8,7 +8,9 @@ export function Hyperlink({ href, children }) { rel: 'nofollow noopener noreferrer', } - return href.includes('chatgpt.com') ? ( + return href.includes('chatgpt.com') || + href.includes('claude.ai') || + href.includes('kimi.moonshot.cn') ? ( { @@ -19,7 +21,7 @@ export function Hyperlink({ href, children }) { data: { url: url.toString(), pinned: false, - saveAsChatgptConfig: true, + jumpBack: true, }, }) }} diff --git a/src/components/NotificationForChatGPTWeb/index.jsx b/src/components/WebJumpBackNotification/index.jsx similarity index 62% rename from src/components/NotificationForChatGPTWeb/index.jsx rename to src/components/WebJumpBackNotification/index.jsx index cd2505c..cece185 100644 --- a/src/components/NotificationForChatGPTWeb/index.jsx +++ b/src/components/WebJumpBackNotification/index.jsx @@ -7,7 +7,7 @@ import 'react-toastify/dist/ReactToastify.css' import { useTheme } from '../../hooks/use-theme.mjs' import { getUserConfig } from '../../config/index.mjs' -const NotificationForChatGPTWeb = () => { +const WebJumpBackNotification = (props) => { const { t } = useTranslation() const [theme, config] = useTheme() @@ -17,6 +17,8 @@ const NotificationForChatGPTWeb = () => { borderRadius: '4px', whiteSpace: 'nowrap', cursor: 'pointer', + color: 'inherit', + backgroundColor: 'transparent', } useEffect(() => { @@ -27,30 +29,37 @@ const NotificationForChatGPTWeb = () => { flexDirection: 'row', alignItems: 'center', gap: '4px', + justifyContent: 'space-between', }} > -
{t('Please keep this tab open. You can now use the web mode of ChatGPTBox')}
+
+ {props.chatgptMode + ? t('Please keep this tab open. You can now use the web mode of ChatGPTBox') + : t('You have successfully logged in for ChatGPTBox and can now return')} +
- + {props.chatgptMode && ( + + )}