Skip to content

Commit f9ef962

Browse files
committed
ChatGPTBox v2.0.0
1 parent e642f2b commit f9ef962

File tree

11 files changed

+38
-25
lines changed

11 files changed

+38
-25
lines changed

.github/workflows/pre-release-build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@ on:
33
workflow_dispatch:
44
# push:
55
# branches:
6-
# - main
6+
# - master
77
# paths:
88
# - "src/**"
99
# - "!src/**/*.json"
1010
# - "build.mjs"
1111
# tags-ignore:
1212
# - "v*"
1313

14+
permissions:
15+
id-token: "write"
16+
contents: "write"
17+
1418
jobs:
1519
build_and_release:
1620
runs-on: ubuntu-22.04

.github/workflows/tagged-release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
tags:
55
- "v*"
66

7+
permissions:
8+
id-token: "write"
9+
contents: "write"
10+
711
jobs:
812
build_and_release:
913
runs-on: macos-12
@@ -12,7 +16,7 @@ jobs:
1216
- run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
1317
- uses: actions/checkout@v3
1418
with:
15-
ref: main
19+
ref: master
1620

1721
- name: Update manifest.json version
1822
uses: jossef/[email protected]
@@ -29,6 +33,7 @@ jobs:
2933
value: ${{ env.VERSION }}
3034

3135
- name: Push files
36+
continue-on-error: true
3237
run: |
3338
git config --global user.email "github-actions[bot]@users.noreply.github.com"
3439
git config --global user.name "github-actions[bot]"

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "chat-gpt-search-engine-extension",
2+
"name": "chatgptbox",
33
"scripts": {
44
"build": "node build.mjs --production",
55
"build:safari": "bash ./safari/build.sh",

safari/appdmg.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"title": "chatGPT for Search Engine",
2+
"title": "ChatGPTBox",
33
"icon": "../src/logo.png",
44
"contents": [
55
{ "x": 448, "y": 344, "type": "link", "path": "/Applications" },
6-
{ "x": 192, "y": 344, "type": "file", "path": "../build/chatGPT-for-Search-Engine.app" }
6+
{ "x": 192, "y": 344, "type": "file", "path": "../build/chatGPTBox.app" }
77
]
88
}

safari/build.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
xcrun safari-web-extension-converter ./build/firefox \
2-
--project-location ./build/safari --app-name chatGPT-for-Search-Engine \
3-
--bundle-identifier dev.josStorer.chatGPT-for-Search-Engine --force --no-prompt --no-open
2+
--project-location ./build/safari --app-name chatGPTBox \
3+
--bundle-identifier dev.josStorer.chatGPTBox --force --no-prompt --no-open
44
git apply safari/project.patch
5-
xcodebuild archive -project ./build/safari/chatGPT-for-Search-Engine/chatGPT-for-Search-Engine.xcodeproj \
6-
-scheme "chatGPT-for-Search-Engine (macOS)" -configuration Release -archivePath ./build/safari/chatGPT-for-Search-Engine.xcarchive
7-
xcodebuild -exportArchive -archivePath ./build/safari/chatGPT-for-Search-Engine.xcarchive \
5+
xcodebuild archive -project ./build/safari/chatGPTBox/chatGPTBox.xcodeproj \
6+
-scheme "chatGPTBox (macOS)" -configuration Release -archivePath ./build/safari/chatGPTBox.xcarchive
7+
xcodebuild -exportArchive -archivePath ./build/safari/chatGPTBox.xcarchive \
88
-exportOptionsPlist ./safari/export-options.plist -exportPath ./build
99
npm install -D appdmg
1010
rm ./build/safari.dmg

safari/project.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
--- a/build/safari/chatGPT-for-Search-Engine/chatGPT-for-Search-Engine.xcodeproj/project.pbxproj
2-
+++ b/build/safari/chatGPT-for-Search-Engine/chatGPT-for-Search-Engine.xcodeproj/project.pbxproj
1+
--- a/build/safari/chatGPTBox/chatGPTBox.xcodeproj/project.pbxproj
2+
+++ b/build/safari/chatGPTBox/chatGPTBox.xcodeproj/project.pbxproj
33
@@ -825,7 +825,7 @@
44
"@executable_path/../../../../Frameworks",
55
);
@@ -19,11 +19,11 @@
1919
+ );
2020
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
2121
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
22-
CODE_SIGN_ENTITLEMENTS = "macOS (App)/chatGPT-for-Search-Engine.entitlements";
22+
CODE_SIGN_ENTITLEMENTS = "macOS (App)/chatGPTBox.entitlements";
2323
@@ -887,6 +891,7 @@
2424
GENERATE_INFOPLIST_FILE = YES;
2525
INFOPLIST_FILE = "macOS (App)/Info.plist";
26-
INFOPLIST_KEY_CFBundleDisplayName = "chatGPT-for-Search-Engine";
26+
INFOPLIST_KEY_CFBundleDisplayName = "chatGPTBox";
2727
+ INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
2828
INFOPLIST_KEY_NSMainStoryboardFile = Main;
2929
INFOPLIST_KEY_NSPrincipalClass = NSApplication;

src/content-script/site-adapters/youtube/index.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,18 @@ export default {
2424
})
2525
).text()
2626

27-
let subtitleUrl = docText.substring(docText.indexOf('https://www.youtube.com/api/timedtext'))
27+
const subtitleUrlStartAt = docText.indexOf('https://www.youtube.com/api/timedtext')
28+
if (subtitleUrlStartAt === -1) return
29+
30+
let subtitleUrl = docText.substring(subtitleUrlStartAt)
2831
subtitleUrl = subtitleUrl.substring(0, subtitleUrl.indexOf('"'))
2932
subtitleUrl = subtitleUrl.replaceAll('\\u0026', '&')
3033

3134
let title = docText.substring(docText.indexOf('"title":"') + '"title":"'.length)
3235
title = title.substring(0, title.indexOf('","'))
3336

3437
const subtitleResponse = await fetch(subtitleUrl)
38+
if (!subtitleResponse.ok) return
3539
let subtitleData = await subtitleResponse.text()
3640

3741
let subtitleContent = ''
@@ -44,7 +48,7 @@ export default {
4448

4549
return cropText(
4650
`Provide a brief summary of the video using concise language and incorporating the video title.` +
47-
`The video title is:"${title}".The subtitle content is as follows:\n${subtitleContent}`,
51+
`The video title is:"${title}".The subtitle content is as follows:\n${subtitleContent}`,
4852
)
4953
} catch (e) {
5054
console.log(e)

src/manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "ChatGPT for Search Engine",
3-
"description": "Display ChatGPT response alongside Search Engine results",
4-
"version": "1.26.1",
2+
"name": "ChatGPTBox",
3+
"description": "Integrating ChatGPT into your browser deeply, everything you need is here",
4+
"version": "2.0.0",
55
"manifest_version": 3,
66
"icons": {
77
"16": "logo.png",

src/manifest.v2.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "ChatGPT for Search Engine",
3-
"description": "Display ChatGPT response alongside Search Engine results",
4-
"version": "1.26.1",
2+
"name": "ChatGPTBox",
3+
"description": "Integrating ChatGPT into your browser deeply, everything you need is here",
4+
"version": "2.0.0",
55
"manifest_version": 2,
66
"icons": {
77
"16": "logo.png",

0 commit comments

Comments
 (0)