feat: improve web mode notification (#309)

This commit is contained in:
josc146
2023-05-08 15:50:42 +08:00
parent b487c03ab3
commit e95372d77d
12 changed files with 107 additions and 49 deletions
+3 -5
View File
@@ -302,7 +302,7 @@ async function overwriteAccessToken() {
}
async function prepareForForegroundRequests() {
if (location.hostname !== 'chat.openai.com') return
if (location.hostname !== 'chat.openai.com' || location.pathname === '/auth/login') return
const userConfig = await getUserConfig()
@@ -313,10 +313,8 @@ async function prepareForForegroundRequests() {
render(<NotificationForChatGPTWeb container={div} />, div)
await Browser.runtime.sendMessage({
type: 'PIN_TAB',
data: {
saveAsChatgptConfig: true,
},
type: 'SET_CHATGPT_TAB',
data: {},
})
registerPortListener(async (session, port) => {