mirror of
https://github.com/wassname/chatGPTBox.git
synced 2026-07-14 11:15:11 +08:00
feat: improve web mode notification (#309)
This commit is contained in:
@@ -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) => {
|
||||
|
||||
@@ -315,17 +315,3 @@
|
||||
background-color: var(--theme-color);
|
||||
box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.chatgptbox-notification {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
position: fixed;
|
||||
top: 25px;
|
||||
right: 25px;
|
||||
z-index: 2147483647;
|
||||
padding: 4px 10px;
|
||||
border: 1px solid;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user