improve NotificationForChatGPTWeb (#710)

This commit is contained in:
josc146
2024-05-31 15:24:20 +08:00
parent 74e8c1fd08
commit 6f17e5cdf4
3 changed files with 9 additions and 3 deletions
+5 -1
View File
@@ -324,7 +324,11 @@ async function prepareForForegroundRequests() {
if (!chatgptWebModelKeys.some((model) => userConfig.activeApiModes.includes(model))) return
if (chatgptWebModelKeys.includes(userConfig.modelName)) {
const url = new URL(window.location.href)
if (
url.searchParams.has('chatgptbox_notification') &&
chatgptWebModelKeys.includes(userConfig.modelName)
) {
const div = document.createElement('div')
document.body.append(div)
render(<NotificationForChatGPTWeb container={div} />, div)