mirror of
https://github.com/wassname/chatGPTBox.git
synced 2026-08-12 11:50:13 +08:00
ChatGPTBox v2.0.0
This commit is contained in:
@@ -24,7 +24,10 @@ export default {
|
||||
})
|
||||
).text()
|
||||
|
||||
let subtitleUrl = docText.substring(docText.indexOf('https://www.youtube.com/api/timedtext'))
|
||||
const subtitleUrlStartAt = docText.indexOf('https://www.youtube.com/api/timedtext')
|
||||
if (subtitleUrlStartAt === -1) return
|
||||
|
||||
let subtitleUrl = docText.substring(subtitleUrlStartAt)
|
||||
subtitleUrl = subtitleUrl.substring(0, subtitleUrl.indexOf('"'))
|
||||
subtitleUrl = subtitleUrl.replaceAll('\\u0026', '&')
|
||||
|
||||
@@ -32,6 +35,7 @@ export default {
|
||||
title = title.substring(0, title.indexOf('","'))
|
||||
|
||||
const subtitleResponse = await fetch(subtitleUrl)
|
||||
if (!subtitleResponse.ok) return
|
||||
let subtitleData = await subtitleResponse.text()
|
||||
|
||||
let subtitleContent = ''
|
||||
@@ -44,7 +48,7 @@ export default {
|
||||
|
||||
return cropText(
|
||||
`Provide a brief summary of the video using concise language and incorporating the video title.` +
|
||||
`The video title is:"${title}".The subtitle content is as follows:\n${subtitleContent}`,
|
||||
`The video title is:"${title}".The subtitle content is as follows:\n${subtitleContent}`,
|
||||
)
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ChatGPT for Search Engine",
|
||||
"description": "Display ChatGPT response alongside Search Engine results",
|
||||
"version": "1.26.1",
|
||||
"name": "ChatGPTBox",
|
||||
"description": "Integrating ChatGPT into your browser deeply, everything you need is here",
|
||||
"version": "2.0.0",
|
||||
"manifest_version": 3,
|
||||
"icons": {
|
||||
"16": "logo.png",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ChatGPT for Search Engine",
|
||||
"description": "Display ChatGPT response alongside Search Engine results",
|
||||
"version": "1.26.1",
|
||||
"name": "ChatGPTBox",
|
||||
"description": "Integrating ChatGPT into your browser deeply, everything you need is here",
|
||||
"version": "2.0.0",
|
||||
"manifest_version": 2,
|
||||
"icons": {
|
||||
"16": "logo.png",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>ChatGPT for Search Engine</title>
|
||||
<title>ChatGPTBox</title>
|
||||
<link rel="stylesheet" href="popup.css" />
|
||||
<meta charset="UTF-8">
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user