@kudoai/chatgpt.js 2.6.7 → 2.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +9 -0
- package/README.md +30 -34
- package/chatgpt.js +2001 -2060
- package/dist/chatgpt.min.js +9 -3
- package/docs/README.md +30 -34
- package/docs/SECURITY.md +25 -25
- package/docs/USERGUIDE.md +6 -65
- package/package.json +73 -73
- package/starters/chrome/LICENSE.md +31 -43
- package/starters/chrome/docs/README.md +93 -93
- package/starters/chrome/docs/SECURITY.md +17 -17
- package/starters/chrome/extension/background.js +14 -14
- package/starters/chrome/extension/content.js +62 -62
- package/starters/chrome/extension/lib/chatgpt.js +2002 -2061
- package/starters/chrome/extension/lib/settings-utils.js +24 -24
- package/starters/chrome/extension/manifest.json +24 -24
- package/starters/chrome/extension/popup/index.html +62 -62
- package/starters/chrome/extension/popup/popup.js +92 -92
- package/starters/chrome/extension/popup/style.css +55 -55
- package/starters/docs/LICENSE.md +13 -25
- package/starters/docs/README.md +29 -29
- package/starters/greasemonkey/LICENSE.md +31 -43
- package/starters/greasemonkey/chatgpt.js-greasemonkey-starter.user.js +5 -5
- package/starters/greasemonkey/docs/README.md +7 -7
- package/starters/greasemonkey/docs/SECURITY.md +17 -17
- package/LICENSE +0 -21
- package/docs/de/LICENSE.md +0 -29
- package/docs/de/README.md +0 -343
- package/docs/de/SECURITY.md +0 -25
- package/docs/es/LICENSE.md +0 -29
- package/docs/es/README.md +0 -343
- package/docs/es/SECURITY.md +0 -25
- package/docs/fr/LICENSE.md +0 -29
- package/docs/fr/README.md +0 -343
- package/docs/fr/SECURITY.md +0 -25
- package/docs/hi/LICENSE.md +0 -29
- package/docs/hi/README.md +0 -344
- package/docs/hi/SECURITY.md +0 -25
- package/docs/it/LICENSE.md +0 -27
- package/docs/it/README.md +0 -343
- package/docs/it/SECURITY.md +0 -25
- package/docs/ja/LICENSE.md +0 -29
- package/docs/ja/README.md +0 -343
- package/docs/ja/SECURITY.md +0 -25
- package/docs/ko/LICENSE.md +0 -32
- package/docs/ko/README.md +0 -348
- package/docs/ko/SECURITY.md +0 -25
- package/docs/ne/LICENSE.md +0 -35
- package/docs/ne/README.md +0 -344
- package/docs/ne/SECURITY.md +0 -25
- package/docs/nl/LICENSE.md +0 -29
- package/docs/nl/README.md +0 -343
- package/docs/nl/SECURITY.md +0 -25
- package/docs/pt/LICENSE.md +0 -29
- package/docs/pt/README.md +0 -343
- package/docs/pt/SECURITY.md +0 -25
- package/docs/vi/LICENSE.md +0 -29
- package/docs/vi/README.md +0 -343
- package/docs/vi/SECURITY.md +0 -25
- package/docs/zh-cn/LICENSE.md +0 -29
- package/docs/zh-cn/README.md +0 -343
- package/docs/zh-cn/SECURITY.md +0 -25
- package/docs/zh-tw/LICENSE.md +0 -29
- package/docs/zh-tw/README.md +0 -342
- package/docs/zh-tw/SECURITY.md +0 -25
- package/starters/chrome/docs/de/LICENSE.md +0 -31
- package/starters/chrome/docs/de/README.md +0 -93
- package/starters/chrome/docs/es/LICENSE.md +0 -31
- package/starters/chrome/docs/es/README.md +0 -93
- package/starters/chrome/docs/fr/LICENSE.md +0 -31
- package/starters/chrome/docs/fr/README.md +0 -93
- package/starters/chrome/docs/hi/LICENSE.md +0 -31
- package/starters/chrome/docs/hi/README.md +0 -93
- package/starters/chrome/docs/hi/SECURITY.md +0 -17
- package/starters/chrome/docs/it/LICENSE.md +0 -29
- package/starters/chrome/docs/it/README.md +0 -93
- package/starters/chrome/docs/ja/LICENSE.md +0 -31
- package/starters/chrome/docs/ja/README.md +0 -93
- package/starters/chrome/docs/ko/LICENSE.md +0 -34
- package/starters/chrome/docs/ko/README.md +0 -93
- package/starters/chrome/docs/nl/LICENSE.md +0 -30
- package/starters/chrome/docs/nl/README.md +0 -93
- package/starters/chrome/docs/pt/LICENSE.md +0 -31
- package/starters/chrome/docs/pt/README.md +0 -93
- package/starters/chrome/docs/vi/LICENSE.md +0 -31
- package/starters/chrome/docs/vi/README.md +0 -93
- package/starters/chrome/docs/zh-cn/LICENSE.md +0 -31
- package/starters/chrome/docs/zh-cn/README.md +0 -93
- package/starters/chrome/docs/zh-cn/SECURITY.md +0 -17
- package/starters/chrome/docs/zh-tw/LICENSE.md +0 -31
- package/starters/chrome/docs/zh-tw/README.md +0 -93
- package/starters/docs/de/LICENSE.md +0 -13
- package/starters/docs/de/README.md +0 -29
- package/starters/docs/es/LICENSE.md +0 -13
- package/starters/docs/es/README.md +0 -29
- package/starters/docs/fr/LICENSE.md +0 -13
- package/starters/docs/fr/README.md +0 -29
- package/starters/docs/hi/LICENSE.md +0 -13
- package/starters/docs/hi/README.md +0 -29
- package/starters/docs/it/LICENSE.md +0 -11
- package/starters/docs/it/README.md +0 -29
- package/starters/docs/ja/LICENSE.md +0 -13
- package/starters/docs/ja/README.md +0 -30
- package/starters/docs/ko/LICENSE.md +0 -16
- package/starters/docs/ko/README.md +0 -29
- package/starters/docs/nl/LICENSE.md +0 -13
- package/starters/docs/nl/README.md +0 -29
- package/starters/docs/pt/LICENSE.md +0 -13
- package/starters/docs/pt/README.md +0 -29
- package/starters/docs/vi/LICENSE.md +0 -13
- package/starters/docs/vi/README.md +0 -29
- package/starters/docs/zh-cn/LICENSE.md +0 -13
- package/starters/docs/zh-cn/README.md +0 -30
- package/starters/docs/zh-tw/LICENSE.md +0 -13
- package/starters/docs/zh-tw/README.md +0 -29
- package/starters/greasemonkey/docs/de/LICENSE.md +0 -31
- package/starters/greasemonkey/docs/es/LICENSE.md +0 -31
- package/starters/greasemonkey/docs/fr/LICENSE.md +0 -31
- package/starters/greasemonkey/docs/hi/LICENSE.md +0 -31
- package/starters/greasemonkey/docs/hi/SECURITY.md +0 -17
- package/starters/greasemonkey/docs/it/LICENSE.md +0 -29
- package/starters/greasemonkey/docs/ja/LICENSE.md +0 -31
- package/starters/greasemonkey/docs/ko/LICENSE.md +0 -34
- package/starters/greasemonkey/docs/nl/LICENSE.md +0 -30
- package/starters/greasemonkey/docs/pt/LICENSE.md +0 -31
- package/starters/greasemonkey/docs/vi/LICENSE.md +0 -31
- package/starters/greasemonkey/docs/zh-cn/LICENSE.md +0 -31
- package/starters/greasemonkey/docs/zh-cn/SECURITY.md +0 -17
- package/starters/greasemonkey/docs/zh-tw/LICENSE.md +0 -31
package/docs/USERGUIDE.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
3
|
<picture>
|
|
4
|
-
<source type="image/png" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/
|
|
5
|
-
<img width=700 src="https://raw.githubusercontent.com/
|
|
4
|
+
<source type="image/png" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/media/images/logos/chatgpt.js/with-reflection/darkmode.png">
|
|
5
|
+
<img width=700 src="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/media/images/logos/chatgpt.js/with-reflection/lightmode.png">
|
|
6
6
|
</picture>
|
|
7
7
|
|
|
8
8
|
**chatgpt.js** is a powerful JavaScript library that allows for super easy interaction w/ the ChatGPT DOM.
|
|
@@ -99,12 +99,7 @@
|
|
|
99
99
|
- [unminify `async`](#unminify-async)
|
|
100
100
|
- [write `async`](#write-async)
|
|
101
101
|
- [history `api`](#history-api)
|
|
102
|
-
- [isOn](#ison)
|
|
103
|
-
- [isOff](#isoff)
|
|
104
|
-
- [activate](#activate-1)
|
|
105
|
-
- [deactivate](#deactivate-1)
|
|
106
102
|
- [isLoaded](#isloaded-async-1)
|
|
107
|
-
- [toggle](#toggle)
|
|
108
103
|
- [instructions `api`](#instructions-api)
|
|
109
104
|
- [add `async`](#add-async)
|
|
110
105
|
- [clear `async`](#clear-async)
|
|
@@ -143,7 +138,7 @@
|
|
|
143
138
|
|
|
144
139
|
```js
|
|
145
140
|
(async () => {
|
|
146
|
-
await import('https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.6.
|
|
141
|
+
await import('https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.6.9/dist/chatgpt.min.js');
|
|
147
142
|
// Your code here...
|
|
148
143
|
})();
|
|
149
144
|
```
|
|
@@ -152,7 +147,7 @@
|
|
|
152
147
|
|
|
153
148
|
```js
|
|
154
149
|
var xhr = new XMLHttpRequest();
|
|
155
|
-
xhr.open('GET', 'https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.6.
|
|
150
|
+
xhr.open('GET', 'https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.6.9/dist/chatgpt.min.js');
|
|
156
151
|
xhr.onload = function () {
|
|
157
152
|
if (xhr.status === 200) {
|
|
158
153
|
var chatgptJS = document.createElement('script');
|
|
@@ -174,7 +169,7 @@ function yourCode() {
|
|
|
174
169
|
|
|
175
170
|
```js
|
|
176
171
|
...
|
|
177
|
-
// @require https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.6.
|
|
172
|
+
// @require https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.6.9/dist/chatgpt.min.js
|
|
178
173
|
// ==/UserScript==
|
|
179
174
|
|
|
180
175
|
// Your code here...
|
|
@@ -184,7 +179,7 @@ function yourCode() {
|
|
|
184
179
|
|
|
185
180
|
> **Note** _To use a starter template: [kudoai/chatgpt.js-chrome-starter](https://github.com/KudoAI/chatgpt.js-chrome-starter)_
|
|
186
181
|
|
|
187
|
-
1. Save https://raw.githubusercontent.com/
|
|
182
|
+
1. Save https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/chatgpt.js to a subdirectory (`lib` in this example)
|
|
188
183
|
|
|
189
184
|
2. Add ES6 export statement to end of `lib/chatgpt.js`
|
|
190
185
|
```js
|
|
@@ -1450,50 +1445,6 @@ Example code:
|
|
|
1450
1445
|
|
|
1451
1446
|
API related to the chat history.
|
|
1452
1447
|
|
|
1453
|
-
### isOn
|
|
1454
|
-
|
|
1455
|
-
Returns a boolean value. `true` if the chat history is enabled, `false` otherwise.
|
|
1456
|
-
|
|
1457
|
-
Example code:
|
|
1458
|
-
|
|
1459
|
-
```js
|
|
1460
|
-
if (chatgpt.history.isOn()) {
|
|
1461
|
-
// Do something
|
|
1462
|
-
}
|
|
1463
|
-
```
|
|
1464
|
-
|
|
1465
|
-
### isOff
|
|
1466
|
-
|
|
1467
|
-
Returns a boolean value. `true` if the chat history is disabled, `false` otherwise.
|
|
1468
|
-
|
|
1469
|
-
Example code:
|
|
1470
|
-
|
|
1471
|
-
```js
|
|
1472
|
-
if (chatgpt.history.isOff()) {
|
|
1473
|
-
// Do something
|
|
1474
|
-
}
|
|
1475
|
-
```
|
|
1476
|
-
|
|
1477
|
-
### activate
|
|
1478
|
-
|
|
1479
|
-
Activates the chat history.
|
|
1480
|
-
|
|
1481
|
-
Example code:
|
|
1482
|
-
|
|
1483
|
-
```js
|
|
1484
|
-
chatgpt.history.activate();
|
|
1485
|
-
```
|
|
1486
|
-
|
|
1487
|
-
### deactivate
|
|
1488
|
-
|
|
1489
|
-
Deactivates the chat history.
|
|
1490
|
-
|
|
1491
|
-
Example code:
|
|
1492
|
-
|
|
1493
|
-
```js
|
|
1494
|
-
chatgpt.history.deactivate();
|
|
1495
|
-
```
|
|
1496
|
-
|
|
1497
1448
|
### isLoaded `async`
|
|
1498
1449
|
|
|
1499
1450
|
Resolves a promise when chat history has finished loading.
|
|
@@ -1507,16 +1458,6 @@ Example code:
|
|
|
1507
1458
|
})();
|
|
1508
1459
|
```
|
|
1509
1460
|
|
|
1510
|
-
### toggle
|
|
1511
|
-
|
|
1512
|
-
Toggles the chat history.
|
|
1513
|
-
|
|
1514
|
-
Example code:
|
|
1515
|
-
|
|
1516
|
-
```js
|
|
1517
|
-
chatgpt.history.toggle();
|
|
1518
|
-
```
|
|
1519
|
-
|
|
1520
1461
|
## instructions `api`
|
|
1521
1462
|
|
|
1522
1463
|
### add `async`
|
package/package.json
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@kudoai/chatgpt.js",
|
|
3
|
-
"version": "2.6.
|
|
4
|
-
"description": "Client-side JavaScript library for ChatGPT",
|
|
5
|
-
"author": {
|
|
6
|
-
"name": "KudoAI & contributors",
|
|
7
|
-
"email": "contact@kudoai.com",
|
|
8
|
-
"url": "https://www.kudoai.com"
|
|
9
|
-
},
|
|
10
|
-
"homepage": "https://chatgpt.js.org",
|
|
11
|
-
"license": "MIT",
|
|
12
|
-
"browser": "chatgpt.js",
|
|
13
|
-
"files": [
|
|
14
|
-
"chatgpt.js",
|
|
15
|
-
"dist/chatgpt.min.js",
|
|
16
|
-
"docs
|
|
17
|
-
"starters/"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"lint
|
|
22
|
-
"lint:
|
|
23
|
-
"lint:fix
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"build:
|
|
28
|
-
"
|
|
29
|
-
"bump:
|
|
30
|
-
"bump:
|
|
31
|
-
"
|
|
32
|
-
"publish:
|
|
33
|
-
"publish:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"@adamlui/
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"eslint
|
|
70
|
-
"eslint-plugin-
|
|
71
|
-
"husky": "^9.0.11"
|
|
72
|
-
}
|
|
73
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@kudoai/chatgpt.js",
|
|
3
|
+
"version": "2.6.9",
|
|
4
|
+
"description": "Client-side JavaScript library for ChatGPT",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "KudoAI & contributors",
|
|
7
|
+
"email": "contact@kudoai.com",
|
|
8
|
+
"url": "https://www.kudoai.com"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://chatgpt.js.org",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"browser": "chatgpt.js",
|
|
13
|
+
"files": [
|
|
14
|
+
"chatgpt.js",
|
|
15
|
+
"dist/chatgpt.min.js",
|
|
16
|
+
"docs/*.md",
|
|
17
|
+
"starters/",
|
|
18
|
+
"!starters/**/docs/*/"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"lint": "eslint . --cache",
|
|
22
|
+
"lint:all": "eslint .",
|
|
23
|
+
"lint:fix": "eslint . --fix --cache",
|
|
24
|
+
"lint:fix-all": "eslint . --fix",
|
|
25
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
26
|
+
"preview:docs": "docsify serve docs",
|
|
27
|
+
"build:js": "bash utils/build.sh",
|
|
28
|
+
"build:css": "scss-to-css",
|
|
29
|
+
"bump:patch": "bash utils/bump.sh patch",
|
|
30
|
+
"bump:minor": "bash utils/bump.sh minor",
|
|
31
|
+
"bump:major": "bash utils/bump.sh major",
|
|
32
|
+
"publish:patch": "bash utils/bump.sh patch --publish",
|
|
33
|
+
"publish:minor": "bash utils/bump.sh minor --publish",
|
|
34
|
+
"publish:major": "bash utils/bump.sh major --publish"
|
|
35
|
+
},
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "git+https://github.com/KudoAI/chatgpt.js.git"
|
|
39
|
+
},
|
|
40
|
+
"keywords": [
|
|
41
|
+
"ai",
|
|
42
|
+
"artificial intelligence",
|
|
43
|
+
"bot",
|
|
44
|
+
"chat",
|
|
45
|
+
"chatbot",
|
|
46
|
+
"chatgpt",
|
|
47
|
+
"clientside",
|
|
48
|
+
"conversational ai",
|
|
49
|
+
"frontend",
|
|
50
|
+
"gpt",
|
|
51
|
+
"gpt3",
|
|
52
|
+
"gpt4",
|
|
53
|
+
"javascript",
|
|
54
|
+
"library",
|
|
55
|
+
"machine learning",
|
|
56
|
+
"ml",
|
|
57
|
+
"nlp",
|
|
58
|
+
"openai"
|
|
59
|
+
],
|
|
60
|
+
"bugs": "https://github.com/KudoAI/chatgpt.js/issues",
|
|
61
|
+
"funding": {
|
|
62
|
+
"type": "github",
|
|
63
|
+
"url": "https://github.com/sponsors/KudoAI"
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"@adamlui/minify.js": "^1.5.8",
|
|
67
|
+
"@adamlui/scss-to-css": "^1.8.3",
|
|
68
|
+
"docsify-cli": "^4.4.4",
|
|
69
|
+
"eslint": "^9.1.1",
|
|
70
|
+
"eslint-plugin-json-schema-validator": "^5.1.0",
|
|
71
|
+
"husky": "^9.0.11"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -1,43 +1,31 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
<h6>
|
|
3
|
-
<picture>
|
|
4
|
-
<source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/media/images/icons/earth-americas-white-icon32.svg">
|
|
5
|
-
<img height=14 src="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/media/images/icons/earth-americas-icon32.svg">
|
|
6
|
-
</picture>
|
|
7
|
-
English |
|
|
8
|
-
<a href="docs/zh-cn/LICENSE.md">简体中文</a> |
|
|
9
|
-
<a href="docs/zh-tw/LICENSE.md">繁體中文</a> |
|
|
10
|
-
<a href="docs/ja/LICENSE.md">日本</a> |
|
|
11
|
-
<a href="docs/ko/LICENSE.md">한국인</a> |
|
|
12
|
-
<a href="docs/hi/LICENSE.md">हिंदी</a> |
|
|
13
|
-
<a href="docs/de/LICENSE.md">Deutsch</a> |
|
|
14
|
-
<a href="docs/es/LICENSE.md">Español</a> |
|
|
15
|
-
<a href="docs/fr/LICENSE.md">Français</a> |
|
|
16
|
-
<a href="docs/it/LICENSE.md">Italiano</a> |
|
|
17
|
-
<a href="docs/nl/LICENSE.md">Nederlands</a> |
|
|
18
|
-
<a href="docs/pt/LICENSE.md">Português</a> |
|
|
19
|
-
<a href="docs/vi/LICENSE.md">Việt</a>
|
|
20
|
-
</h6>
|
|
21
|
-
</div>
|
|
22
|
-
|
|
23
|
-
# 🏛️ MIT License
|
|
24
|
-
|
|
25
|
-
**Copyright
|
|
26
|
-
|
|
27
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
28
|
-
|
|
29
|
-
in
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
furnished to do so, subject to the following conditions:
|
|
33
|
-
|
|
34
|
-
The above copyright notice and this permission notice shall be included in all
|
|
35
|
-
copies or substantial portions of the Software.
|
|
36
|
-
|
|
37
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
38
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
39
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
40
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
41
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
42
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
43
|
-
SOFTWARE.
|
|
1
|
+
<div align="center">
|
|
2
|
+
<h6>
|
|
3
|
+
<picture>
|
|
4
|
+
<source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/media/images/icons/earth-americas-white-icon32.svg">
|
|
5
|
+
<img height=14 src="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/media/images/icons/earth-americas-icon32.svg">
|
|
6
|
+
</picture>
|
|
7
|
+
English |
|
|
8
|
+
<a href="docs/zh-cn/LICENSE.md">简体中文</a> |
|
|
9
|
+
<a href="docs/zh-tw/LICENSE.md">繁體中文</a> |
|
|
10
|
+
<a href="docs/ja/LICENSE.md">日本</a> |
|
|
11
|
+
<a href="docs/ko/LICENSE.md">한국인</a> |
|
|
12
|
+
<a href="docs/hi/LICENSE.md">हिंदी</a> |
|
|
13
|
+
<a href="docs/de/LICENSE.md">Deutsch</a> |
|
|
14
|
+
<a href="docs/es/LICENSE.md">Español</a> |
|
|
15
|
+
<a href="docs/fr/LICENSE.md">Français</a> |
|
|
16
|
+
<a href="docs/it/LICENSE.md">Italiano</a> |
|
|
17
|
+
<a href="docs/nl/LICENSE.md">Nederlands</a> |
|
|
18
|
+
<a href="docs/pt/LICENSE.md">Português</a> |
|
|
19
|
+
<a href="docs/vi/LICENSE.md">Việt</a>
|
|
20
|
+
</h6>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
# 🏛️ MIT License
|
|
24
|
+
|
|
25
|
+
**Copyright © 2023–2024 [KudoAI](https://github.com/KudoAI) & contributors**
|
|
26
|
+
|
|
27
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
28
|
+
|
|
29
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
30
|
+
|
|
31
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
<h6>
|
|
3
|
-
<picture>
|
|
4
|
-
<source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/media/images/icons/earth-americas-white-icon32.svg">
|
|
5
|
-
<img height=14 src="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/media/images/icons/earth-americas-icon32.svg">
|
|
6
|
-
</picture>
|
|
7
|
-
English |
|
|
8
|
-
<a href="zh-cn#readme">简体中文</a> |
|
|
9
|
-
<a href="zh-tw#readme">繁體中文</a> |
|
|
10
|
-
<a href="ja#readme">日本</a> |
|
|
11
|
-
<a href="ko#readme">한국인</a> |
|
|
12
|
-
<a href="hi#readme">हिंदी</a> |
|
|
13
|
-
<a href="de#readme">Deutsch</a> |
|
|
14
|
-
<a href="es#readme">Español</a> |
|
|
15
|
-
<a href="fr#readme">Français</a> |
|
|
16
|
-
<a href="it#readme">Italiano</a> |
|
|
17
|
-
<a href="nl#readme">Nederlands</a> |
|
|
18
|
-
<a href="pt#readme">Português</a> |
|
|
19
|
-
<a href="vi#readme">Việt</a>
|
|
20
|
-
</h6>
|
|
21
|
-
</div>
|
|
22
|
-
|
|
23
|
-
# <img height=21 src="https://www.google.com/chrome/static/images/favicons/apple-icon-60x60.png"> chatgpt.js-chrome-starter
|
|
24
|
-
|
|
25
|
-
<h3>A starting point for developing your own Chrome extension using <a href="https://github.com/KudoAI/chatgpt.js">chatgpt.js</a></h3>
|
|
26
|
-
|
|
27
|
-
<br>
|
|
28
|
-
|
|
29
|
-
<img src="../media/images/screenshots/extension-loaded.png">
|
|
30
|
-
|
|
31
|
-
## ⚡ Installation
|
|
32
|
-
|
|
33
|
-
1. Click **Fork** -or- **Use this template** > **Create a new repository** on https://github.com/KudoAI/chatgpt.js-chrome-starter
|
|
34
|
-
|
|
35
|
-
2. **Clone** your newly created repo locally
|
|
36
|
-
|
|
37
|
-
3. Visit `chrome://extensions` in Chrome (or any Chromium browser)
|
|
38
|
-
|
|
39
|
-
4. Ensure **Develper mode** toggle is activated<br>
|
|
40
|
-

|
|
41
|
-
|
|
42
|
-
5. Click **Load unpacked**<br><br>
|
|
43
|
-
<img src="../media/images/screenshots/load-unpacked-button.png">
|
|
44
|
-
<br>
|
|
45
|
-
|
|
46
|
-
6. In pop-up window, select the **extension** folder > click **Select Folder**<br><br><br>
|
|
47
|
-
<img src="../media/images/screenshots/select-extension-folder.png"><br><br>
|
|
48
|
-
|
|
49
|
-
That's it! **ChatGPT Extension** will now appear in extension list:
|
|
50
|
-
|
|
51
|
-
<br>
|
|
52
|
-
|
|
53
|
-
<img src="../media/images/screenshots/chatgpt-extension-in-list.png">
|
|
54
|
-
|
|
55
|
-
<p><br>
|
|
56
|
-
|
|
57
|
-
**💡 TIP:** _To reflect changes from source code, click **Reload** on extension tile + reload any Chrome tabs extension scripts are running on:_
|
|
58
|
-
|
|
59
|
-
<div align="center">
|
|
60
|
-
|
|
61
|
-
<br>
|
|
62
|
-
|
|
63
|
-
<img src="../media/images/screenshots/reload-extension-button.png">
|
|
64
|
-
<img src="../media/images/screenshots/reload-page-button.png">
|
|
65
|
-
|
|
66
|
-
<p><br>
|
|
67
|
-
|
|
68
|
-
</div>
|
|
69
|
-
|
|
70
|
-
## 🤖 Made with chatgpt.js
|
|
71
|
-
|
|
72
|
-
These are some of the extensions featured by Google that use chatgpt.js:
|
|
73
|
-
|
|
74
|
-
<div align="center">
|
|
75
|
-
|
|
76
|
-
<br>
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
<a href="https://chatgptinfinity.com" target="_blank" rel="noopener">
|
|
80
|
-
<img width=777 src="https://raw.githubusercontent.com/adamlui/chatgpt-infinity/main/chrome/media/images/tiles/marquee-promo-tile-1400x560.png">
|
|
81
|
-
</a>
|
|
82
|
-
|
|
83
|
-
<p><br>
|
|
84
|
-
|
|
85
|
-
<a href="https://chatgptwidescreen.com" target="_blank" rel="noopener">
|
|
86
|
-
<img width=777 src="https://raw.githubusercontent.com/adamlui/chatgpt-widescreen/main/chrome/media/images/tiles/marquee-promo-tile-1400x560.png">
|
|
87
|
-
</a>
|
|
88
|
-
|
|
89
|
-
</div>
|
|
90
|
-
|
|
91
|
-
#
|
|
92
|
-
|
|
93
|
-
<a href="https://github.com/KudoAI/chatgpt.js-chrome-starter/issues">Get Help</a> / <a href="#">Back to top ↑</a>
|
|
1
|
+
<div align="center">
|
|
2
|
+
<h6>
|
|
3
|
+
<picture>
|
|
4
|
+
<source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/media/images/icons/earth-americas-white-icon32.svg">
|
|
5
|
+
<img height=14 src="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/media/images/icons/earth-americas-icon32.svg">
|
|
6
|
+
</picture>
|
|
7
|
+
English |
|
|
8
|
+
<a href="zh-cn#readme">简体中文</a> |
|
|
9
|
+
<a href="zh-tw#readme">繁體中文</a> |
|
|
10
|
+
<a href="ja#readme">日本</a> |
|
|
11
|
+
<a href="ko#readme">한국인</a> |
|
|
12
|
+
<a href="hi#readme">हिंदी</a> |
|
|
13
|
+
<a href="de#readme">Deutsch</a> |
|
|
14
|
+
<a href="es#readme">Español</a> |
|
|
15
|
+
<a href="fr#readme">Français</a> |
|
|
16
|
+
<a href="it#readme">Italiano</a> |
|
|
17
|
+
<a href="nl#readme">Nederlands</a> |
|
|
18
|
+
<a href="pt#readme">Português</a> |
|
|
19
|
+
<a href="vi#readme">Việt</a>
|
|
20
|
+
</h6>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
# <img height=21 src="https://www.google.com/chrome/static/images/favicons/apple-icon-60x60.png"> chatgpt.js-chrome-starter
|
|
24
|
+
|
|
25
|
+
<h3>A starting point for developing your own Chrome extension using <a href="https://github.com/KudoAI/chatgpt.js">chatgpt.js</a></h3>
|
|
26
|
+
|
|
27
|
+
<br>
|
|
28
|
+
|
|
29
|
+
<img src="../media/images/screenshots/extension-loaded.png">
|
|
30
|
+
|
|
31
|
+
## ⚡ Installation
|
|
32
|
+
|
|
33
|
+
1. Click **Fork** -or- **Use this template** > **Create a new repository** on https://github.com/KudoAI/chatgpt.js-chrome-starter
|
|
34
|
+
|
|
35
|
+
2. **Clone** your newly created repo locally
|
|
36
|
+
|
|
37
|
+
3. Visit `chrome://extensions` in Chrome (or any Chromium browser)
|
|
38
|
+
|
|
39
|
+
4. Ensure **Develper mode** toggle is activated<br>
|
|
40
|
+

|
|
41
|
+
|
|
42
|
+
5. Click **Load unpacked**<br><br>
|
|
43
|
+
<img src="../media/images/screenshots/load-unpacked-button.png">
|
|
44
|
+
<br>
|
|
45
|
+
|
|
46
|
+
6. In pop-up window, select the **extension** folder > click **Select Folder**<br><br><br>
|
|
47
|
+
<img src="../media/images/screenshots/select-extension-folder.png"><br><br>
|
|
48
|
+
|
|
49
|
+
That's it! **ChatGPT Extension** will now appear in extension list:
|
|
50
|
+
|
|
51
|
+
<br>
|
|
52
|
+
|
|
53
|
+
<img src="../media/images/screenshots/chatgpt-extension-in-list.png">
|
|
54
|
+
|
|
55
|
+
<p><br>
|
|
56
|
+
|
|
57
|
+
**💡 TIP:** _To reflect changes from source code, click **Reload** on extension tile + reload any Chrome tabs extension scripts are running on:_
|
|
58
|
+
|
|
59
|
+
<div align="center">
|
|
60
|
+
|
|
61
|
+
<br>
|
|
62
|
+
|
|
63
|
+
<img src="../media/images/screenshots/reload-extension-button.png">
|
|
64
|
+
<img src="../media/images/screenshots/reload-page-button.png">
|
|
65
|
+
|
|
66
|
+
<p><br>
|
|
67
|
+
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
## 🤖 Made with chatgpt.js
|
|
71
|
+
|
|
72
|
+
These are some of the extensions featured by Google that use chatgpt.js:
|
|
73
|
+
|
|
74
|
+
<div align="center">
|
|
75
|
+
|
|
76
|
+
<br>
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
<a href="https://chatgptinfinity.com" target="_blank" rel="noopener">
|
|
80
|
+
<img width=777 src="https://raw.githubusercontent.com/adamlui/chatgpt-infinity/main/chrome/media/images/tiles/marquee-promo-tile-1400x560.png">
|
|
81
|
+
</a>
|
|
82
|
+
|
|
83
|
+
<p><br>
|
|
84
|
+
|
|
85
|
+
<a href="https://chatgptwidescreen.com" target="_blank" rel="noopener">
|
|
86
|
+
<img width=777 src="https://raw.githubusercontent.com/adamlui/chatgpt-widescreen/main/chrome/media/images/tiles/marquee-promo-tile-1400x560.png">
|
|
87
|
+
</a>
|
|
88
|
+
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
#
|
|
92
|
+
|
|
93
|
+
<a href="https://github.com/KudoAI/chatgpt.js-chrome-starter/issues">Get Help</a> / <a href="#">Back to top ↑</a>
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
<div align="right">
|
|
2
|
-
<h6>
|
|
3
|
-
<picture>
|
|
4
|
-
<source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/media/images/icons/earth-americas-white-icon32.svg">
|
|
5
|
-
<img height=14 src="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/media/images/icons/earth-americas-icon32.svg">
|
|
6
|
-
</picture>
|
|
7
|
-
English |
|
|
8
|
-
<a href="https://github.com/KudoAI/chatgpt.js-chrome-starter/blob/main/docs/zh-cn/SECURITY.md">简体中文</a> |
|
|
9
|
-
<a href="https://github.com/KudoAI/chatgpt.js-chrome-starter/blob/main/docs/hi/SECURITY.md">हिंदी</a>
|
|
10
|
-
</h6>
|
|
11
|
-
</div>
|
|
12
|
-
|
|
13
|
-
# 🛡️ Security Policy
|
|
14
|
-
|
|
15
|
-
If you find a vulnerability, please open a [draft security advisory](https://github.com/KudoAI/chatgpt.js-chrome-starter/security/advisories/new).
|
|
16
|
-
|
|
17
|
-
Pull requests are also welcome, but for safety reasons, send an email to <security@kudoai.com> and wait for a response before making it public.
|
|
1
|
+
<div align="right">
|
|
2
|
+
<h6>
|
|
3
|
+
<picture>
|
|
4
|
+
<source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/media/images/icons/earth-americas-white-icon32.svg">
|
|
5
|
+
<img height=14 src="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/media/images/icons/earth-americas-icon32.svg">
|
|
6
|
+
</picture>
|
|
7
|
+
English |
|
|
8
|
+
<a href="https://github.com/KudoAI/chatgpt.js-chrome-starter/blob/main/docs/zh-cn/SECURITY.md">简体中文</a> |
|
|
9
|
+
<a href="https://github.com/KudoAI/chatgpt.js-chrome-starter/blob/main/docs/hi/SECURITY.md">हिंदी</a>
|
|
10
|
+
</h6>
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
# 🛡️ Security Policy
|
|
14
|
+
|
|
15
|
+
If you find a vulnerability, please open a [draft security advisory](https://github.com/KudoAI/chatgpt.js-chrome-starter/security/advisories/new).
|
|
16
|
+
|
|
17
|
+
Pull requests are also welcome, but for safety reasons, send an email to <security@kudoai.com> and wait for a response before making it public.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
const allowedHosts = ['chat.openai.com'];
|
|
2
|
-
|
|
3
|
-
// Add install/update actions
|
|
4
|
-
chrome.runtime.onInstalled.addListener((details) => {
|
|
5
|
-
chrome.storage.local.set({ 'chatgptJS_extensionDisabled': false }); // auto-enable
|
|
6
|
-
if (details.reason == 'install') chrome.tabs.create({ url: 'https://chat.openai.com/' }); // open ChatGPT
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
// Sync extension state/settings when ChatGPT tab active
|
|
10
|
-
chrome.tabs.onActivated.addListener((activeInfo) => {
|
|
11
|
-
chrome.tabs.get(activeInfo.tabId, (tab) => {
|
|
12
|
-
if (allowedHosts.includes(new URL(tab.url).hostname)) {
|
|
13
|
-
chrome.tabs.sendMessage(tab.id, { action: 'syncExtension' });
|
|
14
|
-
}});});
|
|
1
|
+
const allowedHosts = ['chat.openai.com'];
|
|
2
|
+
|
|
3
|
+
// Add install/update actions
|
|
4
|
+
chrome.runtime.onInstalled.addListener((details) => {
|
|
5
|
+
chrome.storage.local.set({ 'chatgptJS_extensionDisabled': false }); // auto-enable
|
|
6
|
+
if (details.reason == 'install') chrome.tabs.create({ url: 'https://chat.openai.com/' }); // open ChatGPT
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
// Sync extension state/settings when ChatGPT tab active
|
|
10
|
+
chrome.tabs.onActivated.addListener((activeInfo) => {
|
|
11
|
+
chrome.tabs.get(activeInfo.tabId, (tab) => {
|
|
12
|
+
if (allowedHosts.includes(new URL(tab.url).hostname)) {
|
|
13
|
+
chrome.tabs.sendMessage(tab.id, { action: 'syncExtension' });
|
|
14
|
+
}});});
|