Change "chat.openai.com" to "chatgpt.com"

This commit is contained in:
Anan
2024-05-05 19:05:54 +03:00
committed by josc146
parent e2fcabba74
commit b494193eb5
20 changed files with 87 additions and 87 deletions
+3 -3
View File
@@ -290,7 +290,7 @@ async function prepareForStaticCard() {
}
async function overwriteAccessToken() {
if (location.hostname !== 'chat.openai.com') {
if (location.hostname !== 'chatgpt.com') {
if (location.hostname === 'kimi.moonshot.cn') {
setUserConfig({
kimiMoonShotRefreshToken: window.localStorage.refresh_token,
@@ -308,7 +308,7 @@ async function overwriteAccessToken() {
console.error('json error', error)
}
} else {
const resp = await fetch('https://chat.openai.com/api/auth/session')
const resp = await fetch('https://chatgpt.com/api/auth/session')
data = await resp.json().catch(() => ({}))
}
if (data && data.accessToken) {
@@ -318,7 +318,7 @@ async function overwriteAccessToken() {
}
async function prepareForForegroundRequests() {
if (location.hostname !== 'chat.openai.com' || location.pathname === '/auth/login') return
if (location.hostname !== 'chatgpt.com' || location.pathname === '/auth/login') return
const userConfig = await getUserConfig()