Skip to content

Commit

Permalink
chore: only display the banner when choosing ChatGPT Web Mode (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
josStorer committed Jul 15, 2023
1 parent 9ec3bbe commit ebaf9b8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/content-script/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,11 @@ async function prepareForForegroundRequests() {

if (!chatgptWebModelKeys.some((model) => userConfig.activeApiModes.includes(model))) return

const div = document.createElement('div')
document.body.append(div)
render(<NotificationForChatGPTWeb container={div} />, div)
if (chatgptWebModelKeys.includes(userConfig.modelName)) {
const div = document.createElement('div')
document.body.append(div)
render(<NotificationForChatGPTWeb container={div} />, div)
}

await Browser.runtime.sendMessage({
type: 'SET_CHATGPT_TAB',
Expand Down

0 comments on commit ebaf9b8

Please sign in to comment.