@kudoai/chatgpt.js 3.3.5 → 3.5.0
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/README.md +29 -21
- package/chatgpt.js +149 -94
- package/dist/chatgpt.min.js +3 -3
- package/docs/README.md +29 -21
- package/docs/SECURITY.md +1 -3
- package/docs/USERGUIDE.md +3 -3
- package/package.json +18 -11
- package/starters/chrome/docs/README.md +10 -8
- package/starters/chrome/extension/components/icons.js +31 -0
- package/starters/chrome/extension/components/modals.js +148 -0
- package/starters/chrome/extension/content.js +108 -47
- package/starters/chrome/extension/icons/faded/icon128.png +0 -0
- package/starters/chrome/extension/icons/faded/icon16.png +0 -0
- package/starters/chrome/extension/icons/faded/icon32.png +0 -0
- package/starters/chrome/extension/icons/faded/icon64.png +0 -0
- package/starters/chrome/extension/lib/chatgpt.js +149 -94
- package/starters/chrome/extension/lib/dom.js +35 -0
- package/starters/chrome/extension/lib/settings.js +30 -0
- package/starters/chrome/extension/manifest.json +22 -22
- package/starters/chrome/extension/popup/controller.js +140 -0
- package/starters/chrome/extension/popup/index.html +7 -44
- package/starters/chrome/extension/popup/style.css +33 -10
- package/starters/chrome/extension/service-worker.js +41 -0
- package/starters/greasemonkey/chatgpt.js-greasemonkey-starter.user.js +12 -12
- package/starters/greasemonkey/docs/README.md +2 -0
- package/starters/chrome/extension/background.js +0 -14
- package/starters/chrome/extension/lib/settings-utils.js +0 -24
- package/starters/chrome/extension/popup/popup.js +0 -92
- package/starters/chrome/media/images/icons/refresh/icon16.png +0 -0
- package/starters/chrome/media/images/icons/refresh/icon50.png +0 -0
- /package/starters/chrome/{media/images → images}/icons/question-mark/icon16.png +0 -0
- /package/starters/chrome/{media/images → images}/icons/question-mark/icon512.png +0 -0
- /package/starters/chrome/{media/images → images}/screenshots/chatgpt-extension-in-list.png +0 -0
- /package/starters/chrome/{media/images → images}/screenshots/developer-mode-toggle.png +0 -0
- /package/starters/chrome/{media/images → images}/screenshots/developer-mode-toggle.psd +0 -0
- /package/starters/chrome/{media/images → images}/screenshots/extension-loaded.png +0 -0
- /package/starters/chrome/{media/images → images}/screenshots/load-unpacked-button.png +0 -0
- /package/starters/chrome/{media/images → images}/screenshots/reload-extension-button.png +0 -0
- /package/starters/chrome/{media/images → images}/screenshots/reload-page-button.png +0 -0
- /package/starters/chrome/{media/images → images}/screenshots/select-extension-folder.png +0 -0
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<a href="https://github.com/KudoAI/chatgpt.js/tree/main/docs/ja#readme">日本</a> |
|
|
17
17
|
<a href="https://github.com/KudoAI/chatgpt.js/tree/main/docs/ko#readme">한국인</a> |
|
|
18
18
|
<a href="https://github.com/KudoAI/chatgpt.js/tree/main/docs/hi#readme">हिंदी</a> |
|
|
19
|
-
<a href="https://github.com/KudoAI/chatgpt.js/tree/main/docs/
|
|
19
|
+
<a href="https://github.com/KudoAI/chatgpt.js/tree/main/docs/ne#readme">नेपाली</a> |
|
|
20
20
|
<a href="https://github.com/KudoAI/chatgpt.js/tree/main/docs/de#readme">Deutsch</a> |
|
|
21
21
|
<a href="https://github.com/KudoAI/chatgpt.js/tree/main/docs/es#readme">Español</a> |
|
|
22
22
|
<a href="https://github.com/KudoAI/chatgpt.js/tree/main/docs/fr#readme">Français</a> |
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
|
|
48
48
|
[](https://github.com/KudoAI/chatgpt.js/stargazers)
|
|
49
49
|
[](https://github.com/KudoAI/chatgpt.js/blob/main/LICENSE.md)
|
|
50
|
-
[](https://github.com/KudoAI/chatgpt.js/tree/v3.5.0/dist/chatgpt.min.js)
|
|
51
51
|
[](https://www.codefactor.io/repository/github/kudoai/chatgpt.js)
|
|
52
52
|
[](https://sonarcloud.io/component_measures?metric=new_vulnerabilities&id=kudoai_chatgpt.js)
|
|
53
53
|
[](https://github.com/sindresorhus/awesome-chatgpt#javascript)
|
|
@@ -79,13 +79,14 @@
|
|
|
79
79
|
|
|
80
80
|
</div>
|
|
81
81
|
|
|
82
|
-
>
|
|
82
|
+
> [!NOTE]
|
|
83
|
+
> To always import the latest version (not recommended in production!) replace the versioned jsDelivr URL with: `https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js/chatgpt.min.js`
|
|
83
84
|
|
|
84
85
|
### ES11 (2020):
|
|
85
86
|
|
|
86
87
|
```js
|
|
87
88
|
(async () => {
|
|
88
|
-
await import('https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.
|
|
89
|
+
await import('https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.5.0/dist/chatgpt.min.js');
|
|
89
90
|
// Your code here...
|
|
90
91
|
})();
|
|
91
92
|
```
|
|
@@ -94,7 +95,7 @@
|
|
|
94
95
|
|
|
95
96
|
```js
|
|
96
97
|
var xhr = new XMLHttpRequest();
|
|
97
|
-
xhr.open('GET', 'https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.
|
|
98
|
+
xhr.open('GET', 'https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.5.0/dist/chatgpt.min.js');
|
|
98
99
|
xhr.onload = function () {
|
|
99
100
|
if (xhr.status === 200) {
|
|
100
101
|
var chatgptJS = document.createElement('script');
|
|
@@ -112,11 +113,12 @@ function yourCode() {
|
|
|
112
113
|
|
|
113
114
|
### <img style="margin: 0 2px -0.065rem 0" height=17 src="https://media.chatgptjs.org/images/icons/platforms/tampermonkey/icon28.png?a3e53bf7"><img style="margin: 0 2px -0.035rem 1px" height=17.5 src="https://media.chatgptjs.org/images/icons/platforms/violentmonkey/icon25.png?a3e53bf7"> Greasemonkey:
|
|
114
115
|
|
|
115
|
-
>
|
|
116
|
+
> [!NOTE]
|
|
117
|
+
> To use a starter template: [kudoai/chatgpt.js-greasemonkey-starter](https://github.com/KudoAI/chatgpt.js-greasemonkey-starter)
|
|
116
118
|
|
|
117
119
|
```js
|
|
118
120
|
...
|
|
119
|
-
// @require https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.
|
|
121
|
+
// @require https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.5.0/dist/chatgpt.min.js
|
|
120
122
|
// ==/UserScript==
|
|
121
123
|
|
|
122
124
|
// Your code here...
|
|
@@ -124,7 +126,8 @@ function yourCode() {
|
|
|
124
126
|
|
|
125
127
|
### <img style="margin: 0 2px -1px 0" height=16 src="https://media.chatgptjs.org/images/icons/platforms/chrome/icon16.png?8c852fa5"> Chrome:
|
|
126
128
|
|
|
127
|
-
>
|
|
129
|
+
> [!NOTE]
|
|
130
|
+
> To use a starter template: [kudoai/chatgpt.js-chrome-starter](https://github.com/KudoAI/chatgpt.js-chrome-starter)
|
|
128
131
|
|
|
129
132
|
Since Google does not allow remote code, importing chatgpt.js locally is required:
|
|
130
133
|
|
|
@@ -185,7 +188,7 @@ chatgpt.get('reply', 'last');
|
|
|
185
188
|
|
|
186
189
|
Each call equally fetches the last response. If you think it works, it probably will... so just type it!
|
|
187
190
|
|
|
188
|
-
If it didn't, check out the extended [userguide](https://github.com/KudoAI/chatgpt.js/blob/v3.
|
|
191
|
+
If it didn't, check out the extended [userguide](https://github.com/KudoAI/chatgpt.js/blob/v3.5.0/docs/USERGUIDE.md), or simply submit an [issue](https://github.com/KudoAI/chatgpt.js/issues) or [PR](https://github.com/KudoAI/chatgpt.js/pulls) and it will be integrated, ezpz!
|
|
189
192
|
|
|
190
193
|
<img height=8px width="100%" src="https://media.chatgptjs.org/images/separators/gradient-aqua.png?78210a7">
|
|
191
194
|
|
|
@@ -327,6 +330,13 @@ This library exists thanks to code, translations, issues & ideas from the follow
|
|
|
327
330
|
[](https://github.com/FarukhS52)
|
|
328
331
|
[](https://github.com/Innovatorcloudy)
|
|
329
332
|
[](https://github.com/barbarian360)
|
|
333
|
+
[](https://github.com/adityadeshpande09)
|
|
334
|
+
[](https://github.com/twlite)
|
|
335
|
+
[](https://github.com/sulav7)
|
|
336
|
+
[](https://github.com/samir-byte)
|
|
337
|
+
[](https://github.com/ghimirebibek)
|
|
338
|
+
[](https://github.com/JanumalaAkhilendra)
|
|
339
|
+
[](https://github.com/AliasUruz)
|
|
330
340
|
[](https://github.com/dependabot)
|
|
331
341
|
<a href="https://chatgpt.com"><picture><source type="image/png" media="(prefers-color-scheme: dark)" srcset="https://images.weserv.nl/?url=https://cdn.jsdelivr.net/gh/KudoAI/chatgpt.js@main/media/images/icons/platforms/chatgpt/black-on-white/icon189.png?h=46&w=46&mask=circle&maxage=7d"><img src="https://images.weserv.nl/?url=https://cdn.jsdelivr.net/gh/KudoAI/chatgpt.js@main/media/images/icons/platforms/chatgpt/white-on-black/icon189.png?h=46&w=46&mask=circle&maxage=7d" title="ChatGPT"></picture></a>
|
|
332
342
|
<a href="https://poe.com"><picture><source type="image/png" media="(prefers-color-scheme: dark)" srcset="https://images.weserv.nl/?url=https://cdn.jsdelivr.net/gh/KudoAI/chatgpt.js@main/media/images/icons/platforms/poe/w-purple-blue-stripes/black-on-white/icon175.png?h=46&w=46&mask=circle&maxage=7d"><img src="https://images.weserv.nl/?url=https://cdn.jsdelivr.net/gh/KudoAI/chatgpt.js@main/media/images/icons/platforms/poe/w-purple-blue-stripes/white-on-black/icon175.png?h=46&w=46&mask=circle&maxage=7d" title="Poe"></picture></a>
|
|
@@ -336,20 +346,18 @@ This library exists thanks to code, translations, issues & ideas from the follow
|
|
|
336
346
|
|
|
337
347
|
<img height=8px width="100%" src="https://media.chatgptjs.org/images/separators/gradient-aqua.png?78210a7">
|
|
338
348
|
|
|
339
|
-
<div
|
|
340
|
-
|
|
341
|
-
## 🤝 Partners
|
|
342
|
-
|
|
343
|
-
</div>
|
|
349
|
+
<div align="center">
|
|
344
350
|
|
|
345
|
-
|
|
351
|
+
<br>
|
|
346
352
|
|
|
347
|
-
|
|
353
|
+
**chatgpt.js** is funded in part by:
|
|
348
354
|
|
|
349
|
-
<
|
|
350
|
-
<
|
|
351
|
-
|
|
352
|
-
|
|
355
|
+
<a href="https://microsoft.com">
|
|
356
|
+
<picture>
|
|
357
|
+
<source type="image/png" media="(prefers-color-scheme: dark)" srcset="https://media.chatgptjs.org/images/logos/partners/microsoft/white.png?963f917">
|
|
358
|
+
<img width=300 src="https://media.chatgptjs.org/images/logos/partners/microsoft/colored.png?963f917">
|
|
359
|
+
</picture>
|
|
360
|
+
</a>
|
|
353
361
|
|
|
354
362
|
</div>
|
|
355
363
|
|
|
@@ -360,7 +368,7 @@ This library exists thanks to code, translations, issues & ideas from the follow
|
|
|
360
368
|
<div align="center">
|
|
361
369
|
|
|
362
370
|
**[Releases](https://github.com/KudoAI/chatgpt.js/releases)** /
|
|
363
|
-
[Userguide](https://github.com/KudoAI/chatgpt.js/blob/v3.
|
|
371
|
+
[Userguide](https://github.com/KudoAI/chatgpt.js/blob/v3.5.0/docs/USERGUIDE.md) /
|
|
364
372
|
[Discuss](https://github.com/KudoAI/chatgpt.js/discussions) /
|
|
365
373
|
[Back to top ↑](#top)
|
|
366
374
|
|