@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.
Files changed (40) hide show
  1. package/README.md +29 -21
  2. package/chatgpt.js +149 -94
  3. package/dist/chatgpt.min.js +3 -3
  4. package/docs/README.md +29 -21
  5. package/docs/SECURITY.md +1 -3
  6. package/docs/USERGUIDE.md +3 -3
  7. package/package.json +18 -11
  8. package/starters/chrome/docs/README.md +10 -8
  9. package/starters/chrome/extension/components/icons.js +31 -0
  10. package/starters/chrome/extension/components/modals.js +148 -0
  11. package/starters/chrome/extension/content.js +108 -47
  12. package/starters/chrome/extension/icons/faded/icon128.png +0 -0
  13. package/starters/chrome/extension/icons/faded/icon16.png +0 -0
  14. package/starters/chrome/extension/icons/faded/icon32.png +0 -0
  15. package/starters/chrome/extension/icons/faded/icon64.png +0 -0
  16. package/starters/chrome/extension/lib/chatgpt.js +149 -94
  17. package/starters/chrome/extension/lib/dom.js +35 -0
  18. package/starters/chrome/extension/lib/settings.js +30 -0
  19. package/starters/chrome/extension/manifest.json +22 -22
  20. package/starters/chrome/extension/popup/controller.js +140 -0
  21. package/starters/chrome/extension/popup/index.html +7 -44
  22. package/starters/chrome/extension/popup/style.css +33 -10
  23. package/starters/chrome/extension/service-worker.js +41 -0
  24. package/starters/greasemonkey/chatgpt.js-greasemonkey-starter.user.js +12 -12
  25. package/starters/greasemonkey/docs/README.md +2 -0
  26. package/starters/chrome/extension/background.js +0 -14
  27. package/starters/chrome/extension/lib/settings-utils.js +0 -24
  28. package/starters/chrome/extension/popup/popup.js +0 -92
  29. package/starters/chrome/media/images/icons/refresh/icon16.png +0 -0
  30. package/starters/chrome/media/images/icons/refresh/icon50.png +0 -0
  31. /package/starters/chrome/{media/images → images}/icons/question-mark/icon16.png +0 -0
  32. /package/starters/chrome/{media/images → images}/icons/question-mark/icon512.png +0 -0
  33. /package/starters/chrome/{media/images → images}/screenshots/chatgpt-extension-in-list.png +0 -0
  34. /package/starters/chrome/{media/images → images}/screenshots/developer-mode-toggle.png +0 -0
  35. /package/starters/chrome/{media/images → images}/screenshots/developer-mode-toggle.psd +0 -0
  36. /package/starters/chrome/{media/images → images}/screenshots/extension-loaded.png +0 -0
  37. /package/starters/chrome/{media/images → images}/screenshots/load-unpacked-button.png +0 -0
  38. /package/starters/chrome/{media/images → images}/screenshots/reload-extension-button.png +0 -0
  39. /package/starters/chrome/{media/images → images}/screenshots/reload-page-button.png +0 -0
  40. /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/np#readme">नेपाली</a> |
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://img.shields.io/github/stars/KudoAI/chatgpt.js?label=Stars&color=af68ff&logo=github&logoColor=white&labelColor=464646&style=for-the-badge)](https://github.com/KudoAI/chatgpt.js/stargazers)
49
49
  [![](https://img.shields.io/badge/License-MIT-green.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge)](https://github.com/KudoAI/chatgpt.js/blob/main/LICENSE.md)
50
- [![](https://img.shields.io/github/size/KudoAI/chatgpt.js/dist/chatgpt.min.js?branch=v3.3.5&label=Minified%20Size&logo=databricks&logoColor=white&labelColor=464646&color=ff69b4&style=for-the-badge)](https://github.com/KudoAI/chatgpt.js/tree/v3.3.5/dist/chatgpt.min.js)
50
+ [![](https://img.shields.io/github/size/KudoAI/chatgpt.js/dist/chatgpt.min.js?branch=v3.5.0&label=Minified%20Size&logo=databricks&logoColor=white&labelColor=464646&color=ff69b4&style=for-the-badge)](https://github.com/KudoAI/chatgpt.js/tree/v3.5.0/dist/chatgpt.min.js)
51
51
  [![](https://img.shields.io/codefactor/grade/github/kudoai/chatgpt.js?label=Code+Quality&logo=codefactor&logoColor=white&labelColor=464646&color=1acc6c&style=for-the-badge)](https://www.codefactor.io/repository/github/kudoai/chatgpt.js)
52
52
  [![](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fsonarcloud.io%2Fapi%2Fmeasures%2Fcomponent%3Fcomponent%3Dkudoai_chatgpt.js%26metricKeys%3Dvulnerabilities&query=%24.component.measures.0.value&style=for-the-badge&logo=sonarcloud&logoColor=white&labelColor=464646&label=Vulnerabilities&color=gold)](https://sonarcloud.io/component_measures?metric=new_vulnerabilities&id=kudoai_chatgpt.js)
53
53
  [![](https://img.shields.io/badge/Mentioned_in-Awesome-cca8c4?logo=awesomelists&logoColor=white&labelColor=464646&style=for-the-badge)](https://github.com/sindresorhus/awesome-chatgpt#javascript)
@@ -79,13 +79,14 @@
79
79
 
80
80
  </div>
81
81
 
82
- > **Note** _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`_
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.3.5/dist/chatgpt.min.js');
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.3.5/dist/chatgpt.min.js');
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
- > **Note** _To use a starter template: [kudoai/chatgpt.js-greasemonkey-starter](https://github.com/KudoAI/chatgpt.js-greasemonkey-starter)_
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.3.5/dist/chatgpt.min.js
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
- > **Note** _To use a starter template: [kudoai/chatgpt.js-chrome-starter](https://github.com/KudoAI/chatgpt.js-chrome-starter)_
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.3.5/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!
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://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/129654632?first-contrib=2024.10.10-userguide-typo-correction&h=47&w=47&mask=circle&maxage=7d "@FarukhS52")](https://github.com/FarukhS52)
328
331
  [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/183274513?first-contrib=2024.10.10-create-ru-readme&h=47&w=47&mask=circle&maxage=7d "@Innovatorcloudy")](https://github.com/Innovatorcloudy)
329
332
  [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/94866865?first-contrib=2024.10.11-fix-readme-back-to-top-link&h=47&w=47&mask=circle&maxage=7d "@barbarian360")](https://github.com/barbarian360)
333
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/98452243?first-contrib=2024.10.26-fix-nepali-doc-link&h=47&w=47&mask=circle&maxage=7d "@adityadeshpande09")](https://github.com/adityadeshpande09)
334
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/46562212?first-contrib=2024.10.27-added-callout-notation-to-en-readme&h=47&w=47&mask=circle&maxage=7d "@twlite")](https://github.com/twlite)
335
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/100464898?first-contrib=2024.10.27-fix-nepali-grammar&h=47&w=47&mask=circle&maxage=7d "@sulav7")](https://github.com/sulav7)
336
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/75193555?first-contrib=2024.10.28-fix-nepali-typo&h=47&w=47&mask=circle&maxage=7d "@samir-byte")](https://github.com/samir-byte)
337
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/54546340?first-contrib=2024.10.28-fix-nepali-grammar&h=47&w=47&mask=circle&maxage=7d "@ghimirebibek")](https://github.com/ghimirebibek)
338
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/82641474?first-contrib=2024.10.30-improve-hindi-readme&h=47&w=47&mask=circle&maxage=7d "@JanumalaAkhilendra")](https://github.com/JanumalaAkhilendra)
339
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/130197125?first-contrib=2024.12.1-new-chat-selector-outdated-report&h=47&w=47&mask=circle&maxage=7d "@AliasUruz")](https://github.com/AliasUruz)
330
340
  [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/in/29110&h=47&w=47&mask=circle&maxage=7d "Dependabot")](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 id="partners">
340
-
341
- ## 🤝 Partners
342
-
343
- </div>
349
+ <div align="center">
344
350
 
345
- **chatgpt.js** is funded in part by:
351
+ <br>
346
352
 
347
- <div id="partners-collage" align="center">
353
+ **chatgpt.js** is funded in part by:
348
354
 
349
- <picture>
350
- <source type="image/png" media="(prefers-color-scheme: dark)" srcset="https://media.chatgptjs.org/images/logos/partners/collage/white.png?3109608">
351
- <img width=888 src="https://media.chatgptjs.org/images/logos/partners/collage/black.png?3109608">
352
- </picture>
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.3.5/docs/USERGUIDE.md) /
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