mirror of
https://github.com/pionxzh/chatgpt-exporter.git
synced 2026-09-21 13:37:42 -05:00
@@ -115,7 +115,7 @@ function conversationToHtml(conversation: ConversationResult, avatar: string, me
|
||||
|
||||
const date = dateStr()
|
||||
const time = new Date().toISOString()
|
||||
const source = `${baseUrl}/chat/${id}`
|
||||
const source = `${baseUrl}/c/${id}`
|
||||
const lang = document.documentElement.lang ?? 'en'
|
||||
const theme = getColorScheme()
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ export async function exportAllToMarkdown(fileNameFormat: string, apiConversatio
|
||||
|
||||
function conversationToMarkdown(conversation: ConversationResult, metaList?: ExportMeta[]) {
|
||||
const { id, title, model, modelSlug, conversationNodes } = conversation
|
||||
const source = `${baseUrl}/chat/${id}`
|
||||
const source = `${baseUrl}/c/${id}`
|
||||
|
||||
const _metaList = metaList
|
||||
?.filter(x => !!x.name)
|
||||
|
||||
@@ -42,7 +42,7 @@ function getUserProfile() {
|
||||
}
|
||||
|
||||
export function getChatIdFromUrl() {
|
||||
const match = location.pathname.match(/^\/chat\/([a-z0-9-]+)$/i)
|
||||
const match = location.pathname.match(/^\/c\/([a-z0-9-]+)$/i)
|
||||
if (match) return match[1]
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -31,11 +31,11 @@ export default defineConfig({
|
||||
},
|
||||
'license': packageJson.license,
|
||||
'match': [
|
||||
'https://chat.openai.com/chat',
|
||||
// support https://chat.openai.com/chat?model=gpt-4
|
||||
'https://chat.openai.com/chat?*',
|
||||
// support https://chat.openai.com/chat/123456789
|
||||
'https://chat.openai.com/chat/*',
|
||||
'https://chat.openai.com',
|
||||
// support https://chat.openai.com/c?model=gpt-4
|
||||
'https://chat.openai.com/c?*',
|
||||
// support https://chat.openai.com/c/123456789
|
||||
'https://chat.openai.com/c/*',
|
||||
],
|
||||
'icon': 'https://chat.openai.com/favicon.ico',
|
||||
'run-at': 'document-end',
|
||||
|
||||
Reference in New Issue
Block a user