@kudoai/chatgpt.js 2.9.1 → 2.9.3

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 CHANGED
@@ -45,7 +45,8 @@
45
45
  [![](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)
46
46
  [![](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)
47
47
  [![](https://img.shields.io/github/commit-activity/m/KudoAI/chatgpt.js?label=Commits&logo=github&logoColor=white&labelColor=464646&style=for-the-badge)](https://github.com/KudoAI/chatgpt.js/commits/main)
48
- [![](https://img.shields.io/github/size/KudoAI/chatgpt.js/dist/chatgpt.min.js?branch=v2.9.1&label=Minified%20Size&logo=databricks&logoColor=white&labelColor=464646&color=ff69b4&style=for-the-badge)](https://github.com/KudoAI/chatgpt.js/tree/v2.9.1/dist/chatgpt.min.js)
48
+ ![](https://img.shields.io/badge/Clones-2.8k/month-869da0?logo=github&logoColor=white&labelColor=464646&style=for-the-badge)
49
+ [![](https://img.shields.io/github/size/KudoAI/chatgpt.js/dist/chatgpt.min.js?branch=v2.9.3&label=Minified%20Size&logo=databricks&logoColor=white&labelColor=464646&color=ff69b4&style=for-the-badge)](https://github.com/KudoAI/chatgpt.js/tree/v2.9.3/dist/chatgpt.min.js)
49
50
  [![](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)
50
51
  [![](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)
51
52
  [![](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)
@@ -83,7 +84,7 @@
83
84
 
84
85
  ```js
85
86
  (async () => {
86
- await import('https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.9.1/dist/chatgpt.min.js');
87
+ await import('https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.9.3/dist/chatgpt.min.js');
87
88
  // Your code here...
88
89
  })();
89
90
  ```
@@ -92,7 +93,7 @@
92
93
 
93
94
  ```js
94
95
  var xhr = new XMLHttpRequest();
95
- xhr.open('GET', 'https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.9.1/dist/chatgpt.min.js');
96
+ xhr.open('GET', 'https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.9.3/dist/chatgpt.min.js');
96
97
  xhr.onload = function () {
97
98
  if (xhr.status === 200) {
98
99
  var chatgptJS = document.createElement('script');
@@ -108,19 +109,19 @@ function yourCode() {
108
109
  }
109
110
  ```
110
111
 
111
- ### <img style="margin: 0 2px -0.065rem 0" height=17 src="https://cdn.jsdelivr.net/gh/KudoAI/chatgpt.js@e26f2cf/starters/media/images/icons/tampermonkey-icon28.png"><img style="margin: 0 2px -0.035rem 1px" height=17.5 src="https://cdn.jsdelivr.net/gh/KudoAI/chatgpt.js@0c37090/starters/media/images/icons/violentmonkey-icon100.png"> Greasemonkey:
112
+ ### <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:
112
113
 
113
114
  > **Note** _To use a starter template: [kudoai/chatgpt.js-greasemonkey-starter](https://github.com/KudoAI/chatgpt.js-greasemonkey-starter)_
114
115
 
115
116
  ```js
116
117
  ...
117
- // @require https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.9.1/dist/chatgpt.min.js
118
+ // @require https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.9.3/dist/chatgpt.min.js
118
119
  // ==/UserScript==
119
120
 
120
121
  // Your code here...
121
122
  ```
122
123
 
123
- ### <img style="margin: 0 2px -1px 0" height=16 src="https://www.google.com/chrome/static/images/favicons/apple-icon-60x60.png"> Chrome:
124
+ ### <img style="margin: 0 2px -1px 0" height=16 src="https://media.chatgptjs.org/images/icons/platforms/chrome/icon16.png?8c852fa5"> Chrome:
124
125
 
125
126
  > **Note** _To use a starter template: [kudoai/chatgpt.js-chrome-starter](https://github.com/KudoAI/chatgpt.js-chrome-starter)_
126
127
 
@@ -189,7 +190,7 @@ chatgpt.get('reply', 'last');
189
190
 
190
191
  Each call equally fetches the last response. If you think it works, it probably will... so just type it!
191
192
 
192
- If it didn't, check out the extended [userguide](https://github.com/KudoAI/chatgpt.js/blob/v2.9.1/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!
193
+ If it didn't, check out the extended [userguide](https://github.com/KudoAI/chatgpt.js/blob/v2.9.3/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!
193
194
 
194
195
  <img height=8px width="100%" src="https://media.chatgptjs.org/images/separators/gradient-aqua.png?78210a7">
195
196
 
@@ -203,58 +204,65 @@ https://github.com/KudoAI/chatgpt.js/assets/10906554/f53c740f-d5e0-49b6-ae02-3b3
203
204
 
204
205
  #
205
206
 
206
- ### <picture><source media="(prefers-color-scheme: dark)" srcset="https://i.imgur.com/RduASbD.png"><img width=16 src="https://raw.githubusercontent.com/adamlui/chatgpt-addons/main/media/icons/openai-favicon64.png"></picture> [Autoclear ChatGPT History](https://autoclearchatgpt.com) &nbsp;<a href="https://github.com/awesome-scripts/awesome-userscripts#chatgpt" target="_blank" rel="noopener"><img src="https://awesome.re/mentioned-badge.svg" style="margin:0 0 -2px 5px"></a>
207
+ ### <picture><source type="image/png" media="(prefers-color-scheme: dark)" srcset="https://media.autoclearchatgpt.com/images/icons/openai/white/icon48.png?cece513"><img width=21 src="https://media.autoclearchatgpt.com/images/icons/openai/black/icon48.png?cece513"></picture> [Autoclear ChatGPT History](https://autoclearchatgpt.com) &nbsp;<a href="https://github.com/awesome-scripts/awesome-userscripts#chatgpt" target="_blank" rel="noopener"><img src="https://media.autoclearchatgpt.com/images/badges/awesome/badge.svg?2c0d9fc" style="margin:0 0 -2px 5px"></a>
207
208
 
208
209
  > Auto-clear your ChatGPT query history for maximum privacy.
209
210
  <br>[Install](https://docs.autoclearchatgpt.com/#-installation) /
210
211
  [Readme](https://docs.autoclearchatgpt.com/#readme) /
211
212
  [Discuss](https://github.autoclearchatgpt.com/discussions)
212
213
 
213
- ### <img src="https://media.bravegpt.com/images/icons/bravegpt/icon48.png" width=18> [BraveGPT](https://bravegpt.com) &nbsp;<a href="https://www.producthunt.com/posts/bravegpt?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-bravegpt" target="_blank" rel="noopener"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=385630&theme=light" style="width: 112px; height: 24px; margin:0 0 -4px 5px;" width="112" height="24" /></a>
214
+ ### <img width=24 src="https://media.bravegpt.com/images/icons/bravegpt/icon48.png?0a9e287"> [BraveGPT](https://bravegpt.com) &nbsp;<a href="https://www.producthunt.com/posts/bravegpt?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-bravegpt" target="_blank" rel="noopener"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=385630&theme=light" style="width: 112px; height: 24px; margin:0 0 -4px 5px;" width="112" height="24" /></a>
214
215
 
215
216
  > Display ChatGPT answers in Brave Search sidebar (powered by GPT-4!)
216
217
  <br>[Install](https://docs.bravegpt.com/#-installation) /
217
218
  [Readme](https://docs.bravegpt.com/#readme) /
218
219
  [Discuss](https://github.bravegpt.com/discussions)
219
220
 
220
- ### <picture><source media="(prefers-color-scheme: dark)" srcset="https://i.imgur.com/RduASbD.png"><img width=16 src="https://raw.githubusercontent.com/adamlui/chatgpt-userscripts/main/media/icons/openai-favicon64.png"></picture> [ChatGPT Auto-Continue ⏩](https://chatgptautocontinue.com) &nbsp;<a href="https://github.com/awesome-scripts/awesome-userscripts#chatgpt" target="_blank" rel="noopener"><img src="https://awesome.re/mentioned-badge.svg" style="margin:0 0 -3px 3px"></a>
221
+ ### <picture><source type="image/png" media="(prefers-color-scheme: dark)" srcset="https://media.chatgptautocontinue.com/images/icons/openai/white/icon48.png?7bbd222"><img width=21 src="https://media.chatgptautocontinue.com/images/icons/openai/black/icon48.png?7bbd222"></picture> [ChatGPT Auto-Continue ⏩](https://chatgptautocontinue.com) &nbsp;<a href="https://github.com/awesome-scripts/awesome-userscripts#chatgpt" target="_blank" rel="noopener"><img src="https://media.chatgptautocontinue.com/images/badges/awesome/badge.svg?3c80c0c" style="margin:0 0 -3px 3px"></a>
221
222
 
222
223
  > Automatically continue generating multiple ChatGPT responses.
223
224
  <br>[Install](https://docs.chatgptautocontinue.com/#-installation) /
224
225
  [Readme](https://docs.chatgptautocontinue.com/#readme) /
225
226
  [Discuss](https://github.chatgptautocontinue.com/discussions)
226
227
 
227
- ### <picture><source media="(prefers-color-scheme: dark)" srcset="https://i.imgur.com/RduASbD.png"><img width=16 src="https://raw.githubusercontent.com/adamlui/chatgpt-addons/main/media/icons/openai-favicon64.png"></picture> [ChatGPT Auto Refresh ↻](https://chatgptautorefresh.com) &nbsp;<a href="https://github.com/awesome-scripts/awesome-userscripts#chatgpt" target="_blank" rel="noopener"><img src="https://awesome.re/mentioned-badge.svg" style="margin:0 0 -2px 5px"></a>
228
+ ### <picture><source type="image/png" media="(prefers-color-scheme: dark)" srcset="https://media.chatgptautorefresh.com/images/icons/openai/white/icon48.png?a45cf1e"><img width=21 src="https://media.chatgptautorefresh.com/images/icons/openai/black/icon48.png?a45cf1e"></picture> [ChatGPT Auto Refresh ↻](https://chatgptautorefresh.com) &nbsp;<a href="https://github.com/awesome-scripts/awesome-userscripts#chatgpt" target="_blank" rel="noopener"><img src="https://media.chatgptautorefresh.com/images/badges/awesome/badge.svg?1080f44" style="margin:0 0 -2px 5px"></a>
228
229
 
229
230
  > Keeps ChatGPT sessions fresh to eliminate network errors + Cloudflare checks.
230
231
  <br>[Install](https://docs.chatgptautorefresh.com/#-installation) /
231
232
  [Readme](https://docs.chatgptautorefresh.com/#readme) /
232
233
  [Discuss](https://github.chatgptautorefresh.com/discussions)
233
234
 
234
- ### <img src="https://media.ddgpt.com/images/icons/duckduckgpt/icon48.png" width=17> [DuckDuckGPT](https://duckduckgpt.com) &nbsp;<a href="https://www.producthunt.com/posts/duckduckgpt?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-duckduckgpt" target="_blank" rel="noopener"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=379261&theme=light" style="width: 112px; height: 24px; margin:0 0 -4px 5px;" width="112" height="24" /></a>
235
+ ### <img width=23 src="https://media.ddgpt.com/images/icons/duckduckgpt/icon48.png?af89302"> [DuckDuckGPT](https://duckduckgpt.com) &nbsp;<a href="https://www.producthunt.com/posts/duckduckgpt?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-duckduckgpt" target="_blank" rel="noopener"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=379261&theme=light" style="width: 112px; height: 24px; margin:0 0 -4px 5px;" width="112" height="24" /></a>
235
236
 
236
237
  > Display ChatGPT answers in DuckDuckGo sidebar (powered by GPT-4!)
237
238
  <br>[Install](https://docs.ddgpt.com/#-installation) /
238
239
  [Readme](https://docs.ddgpt.com/#readme) /
239
240
  [Discuss](https://github.ddgpt.com/discussions)
240
241
 
241
- ### <picture><source media="(prefers-color-scheme: dark)" srcset="https://media.googlegpt.io/images/icons/googlegpt/white/icon32.png"><img width=17 src="https://media.googlegpt.io/images/icons/googlegpt/black/icon32.png"></picture> [GoogleGPT](https://googlegpt.io) &nbsp;<a href="https://github.com/awesome-scripts/awesome-userscripts#chatgpt" target="_blank" rel="noopener"><img src="https://media.googlegpt.io/images/badges/awesome/badge.svg" style="margin:0 0 -2px 5px"></a>
242
+ ### <picture><source type="image/png" media="(prefers-color-scheme: dark)" srcset="https://media.googlegpt.io/images/icons/googlegpt/white/icon32.png?8652a6e"><img width=21 src="https://media.googlegpt.io/images/icons/googlegpt/black/icon32.png?8652a6e"></picture> [GoogleGPT](https://googlegpt.io) &nbsp;<a href="https://github.com/awesome-scripts/awesome-userscripts#chatgpt" target="_blank" rel="noopener"><img src="https://media.googlegpt.io/images/badges/awesome/badge.svg?699c63d" style="margin:0 0 -2px 5px"></a>
242
243
 
243
244
  > Display ChatGPT answers in Google Search sidebar (powered by GPT-4!)
244
245
  <br>[Install](https://greasyfork.org/scripts/478597-googlegpt) /
245
246
  [Readme](https://docs.googlegpt.io/#readme) /
246
247
  [Discuss](https://github.googlegpt.io/discussions)
247
248
 
249
+ ### <img width=23 src="https://media.chatgptjs.org/images/icons/platforms/thunderbird/icon32.png?313a9c5"> [ThunderAI](https://micz.it/thunderdbird-addon-thunderai/)
250
+
251
+ > Use ChatGPT in Thunderbird to enhance you emails, even with a free account!
252
+ <br>[Install](https://addons.thunderbird.net/thunderbird/addon/thunderai/) /
253
+ [Readme](https://micz.it/thunderdbird-addon-thunderai/) /
254
+ [Support](https://github.com/micz/ThunderAI/issues)
255
+
248
256
  <p><br>
249
257
 
250
258
  <a href="https://chatgptinfinity.com" target="_blank" rel="noopener">
251
- <img width=555 src="https://raw.githubusercontent.com/adamlui/chatgpt-infinity/main/chrome/media/images/tiles/marquee-promo-tile-1400x560.png">
259
+ <img width=555 src="https://cdn.jsdelivr.net/gh/adamlui/chatgpt-infinity@0f48c4e/chrome/media/images/tiles/marquee-promo-tile-1400x560.png">
252
260
  </a>
253
261
 
254
262
  <p><br>
255
263
 
256
264
  <a href="https://chatgptwidescreen.com" target="_blank" rel="noopener">
257
- <img width=555 src="https://raw.githubusercontent.com/adamlui/chatgpt-widescreen/main/chrome/media/images/tiles/marquee-promo-tile-1400x560.png">
265
+ <img width=555 src="https://cdn.jsdelivr.net/gh/adamlui/chatgpt-widescreen@3ed0950/chrome/media/images/tiles/marquee-promo-tile-1400x560.png">
258
266
  </a>
259
267
 
260
268
  <p><br>
@@ -275,36 +283,36 @@ This library exists thanks to code, translations, issues & ideas from the follow
275
283
 
276
284
  <div align="center"><br>
277
285
 
278
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/10906554?first-contrib=2023.03.15&h=51&w=51&mask=circle&maxage=7d "@adamlui")](https://github.com/adamlui)
279
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/71683364?first-contrib=2023.03.16-get-functions&h=51&w=51&mask=circle&maxage=7d "@mefengl")](https://github.com/mefengl)
280
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/131989355?first-contrib=2023.04.30-doc-translations&h=51&w=51&mask=circle&maxage=7d "@Zin6969")](https://github.com/Zin6969)
281
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/30551844?first-contrib=2023.05.02-getlastresponse-bug-report&h=51&w=51&mask=circle&maxage=7d "@madruga8")](https://github.com/madruga8)
282
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/54934866?first-contrib=2023.05.01-clearchats-discard-fix&h=51&w=51&mask=circle&maxage=7d "@XiaoYingYo")](https://github.com/XiaoYingYo)
283
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/129722778?first-contrib=2023.05.24-css-readability&h=51&w=51&mask=circle&maxage=7d "@AliAlSarre")](https://github.com/AliAlSarre)
284
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/100418457?first-contrib=2023.06.02-send-function-bug-report&h=51&w=51&mask=circle&maxage=7d "@madkarmaa")](https://github.com/madkarmaa)
285
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/1170326?first-contrib=2023.06.10-html-parser-idea&h=51&w=51&mask=circle&maxage=7d "@wamoyo")](https://github.com/wamoyo)
286
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/33952?first-contrib=2023.06.10-html-parser-idea&h=51&w=51&mask=circle&maxage=7d "@meiraleal")](https://github.com/meiraleal)
287
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/22633385?first-contrib=2023.07.11-fix-ja-doc-md&h=51&w=51&mask=circle&maxage=7d "@eltociear")](https://github.com/eltociear)
288
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/72805486?first-contrib=2023.07.14-enhance-ko-docs&h=51&w=51&mask=circle&maxage=7d "@Rojojun")](https://github.com/Rojojun)
289
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/62183023?first-contrib=2023.07.24-fix-hi-doc&h=51&w=51&mask=circle&maxage=7d "@iamnishantgaharwar")](https://github.com/iamnishantgaharwar)
290
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/629429?first-contrib=2023.07.31-homepage-starry-bg&h=51&w=51&mask=circle&maxage=7d "@hakimel")](https://github.com/hakimel)
291
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/73983677?first-contrib=2023.08.23-fix-readme-typos&h=51&w=51&mask=circle&maxage=7d "@omahs")](https://github.com/omahs)
292
- [![](https://images.weserv.nl/?url=https://i.imgur.com/DQVC7vj.jpg?first-contrib=2023.09.19-add-dmarc-policy&h=51&w=51&mask=circle&maxage=7d "Najam Ul Arfeen")](https://www.linkedin.com/in/najam-ul-arfeen-khan/)
293
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/110587589?first-contrib=2023.10.13-translate-docs-to-nepali&h=51&w=51&mask=circle&maxage=7d "@iambijayd")](https://github.com/iambijayd)
294
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/4698976?first-contrib=2023.10.29-remove-outdated-mv2-preface-from-docs&h=51&w=51&mask=circle&maxage=7d "@abhinavm24")](https://github.com/abhinavm24)
295
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/77867745?first-contrib=2023.11.4-getchatdetails-bug-report&h=51&w=51&mask=circle&maxage=7d "@deyvisml")](https://github.com/deyvisml)
296
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/150537240?first-contrib=2023.11.15-regenerate-btn-changed-bug-email&h=51&w=51&mask=circle&maxage=7d "@philly88r")](https://github.com/philly88r)
297
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/9730392?first-contrib=2023.12.18-get-response-from-dom-request&h=51&w=51&mask=circle&maxage=7d "@thomasgauthier")](https://github.com/thomasgauthier)
298
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/42911524?first-contrib=2024.1.17-add-custom-gpt-support&h=51&w=51&mask=circle&maxage=7d "@pranav-bhatt")](https://github.com/pranav-bhatt)
299
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/13976824?first-contrib=2024.01.31-aria-labels-unreliable-bug-report&h=50&w=50&mask=circle&maxage=7d "@hopana")](https://github.com/hopana)
300
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/26219737?first-contrib=2024.2.2-data-key-message-bug-fix&h=50&w=50&mask=circle&maxage=7d "@emtry")](https://github.com/emtry)
301
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/44357327?first-contrib=2024.2.14-msg-fetching-for-localization-fails-report&h=51&w=51&mask=circle&maxage=7d "@thedayofcondor")](https://github.com/thedayofcondor)
302
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/111466842?first-contrib=2024.2.15-add-en-gb-locale&h=51&w=51&mask=circle&maxage=7d "@Luwa-Tech")](https://github.com/Luwa-Tech)
303
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/61795?first-contrib=2024.5.9-update-css-selector-for-getregeneratebutton&h=51&w=51&mask=circle&maxage=7d "@micz")](https://github.com/micz)
304
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/17583722?first-contrib=2024.5.17-chrome-starter-manifest-matches-outdated-alert&h=51&w=51&mask=circle&maxage=7d "@imranaalam")](https://github.com/imranaalam)
305
- [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/in/29110&h=51&w=51&mask=circle&maxage=7d "Dependabot")](https://github.com/dependabot)
306
- <a href="https://chatgpt.com"><picture><source 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=50&w=50&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=50&w=50&mask=circle&maxage=7d" title="ChatGPT"></picture></a>
307
- <a href="https://poe.com"><picture><source 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=50&w=50&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=50&w=50&mask=circle&maxage=7d" title="Poe"></picture></a>
286
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/10906554?first-contrib=2023.03.15&h=47&w=47&mask=circle&maxage=7d "@adamlui")](https://github.com/adamlui)
287
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/71683364?first-contrib=2023.03.16-get-functions&h=47&w=47&mask=circle&maxage=7d "@mefengl")](https://github.com/mefengl)
288
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/131989355?first-contrib=2023.04.30-doc-translations&h=47&w=47&mask=circle&maxage=7d "@Zin6969")](https://github.com/Zin6969)
289
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/30551844?first-contrib=2023.05.02-getlastresponse-bug-report&h=47&w=47&mask=circle&maxage=7d "@madruga8")](https://github.com/madruga8)
290
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/54934866?first-contrib=2023.05.01-clearchats-discard-fix&h=47&w=47&mask=circle&maxage=7d "@XiaoYingYo")](https://github.com/XiaoYingYo)
291
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/129722778?first-contrib=2023.05.24-css-readability&h=47&w=47&mask=circle&maxage=7d "@AliAlSarre")](https://github.com/AliAlSarre)
292
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/100418457?first-contrib=2023.06.02-send-function-bug-report&h=47&w=47&mask=circle&maxage=7d "@madkarmaa")](https://github.com/madkarmaa)
293
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/1170326?first-contrib=2023.06.10-html-parser-idea&h=47&w=47&mask=circle&maxage=7d "@wamoyo")](https://github.com/wamoyo)
294
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/33952?first-contrib=2023.06.10-html-parser-idea&h=47&w=47&mask=circle&maxage=7d "@meiraleal")](https://github.com/meiraleal)
295
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/22633385?first-contrib=2023.07.11-fix-ja-doc-md&h=47&w=47&mask=circle&maxage=7d "@eltociear")](https://github.com/eltociear)
296
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/72805486?first-contrib=2023.07.14-enhance-ko-docs&h=47&w=47&mask=circle&maxage=7d "@Rojojun")](https://github.com/Rojojun)
297
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/62183023?first-contrib=2023.07.24-fix-hi-doc&h=47&w=47&mask=circle&maxage=7d "@iamnishantgaharwar")](https://github.com/iamnishantgaharwar)
298
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/629429?first-contrib=2023.07.31-homepage-starry-bg&h=47&w=47&mask=circle&maxage=7d "@hakimel")](https://github.com/hakimel)
299
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/73983677?first-contrib=2023.08.23-fix-readme-typos&h=47&w=47&mask=circle&maxage=7d "@omahs")](https://github.com/omahs)
300
+ [![](https://images.weserv.nl/?url=https://i.imgur.com/DQVC7vj.jpg?first-contrib=2023.09.19-add-dmarc-policy&h=47&w=47&mask=circle&maxage=7d "Najam Ul Arfeen")](https://www.linkedin.com/in/najam-ul-arfeen-khan/)
301
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/110587589?first-contrib=2023.10.13-translate-docs-to-nepali&h=47&w=47&mask=circle&maxage=7d "@iambijayd")](https://github.com/iambijayd)
302
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/4698976?first-contrib=2023.10.29-remove-outdated-mv2-preface-from-docs&h=47&w=47&mask=circle&maxage=7d "@abhinavm24")](https://github.com/abhinavm24)
303
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/77867745?first-contrib=2023.11.4-getchatdetails-bug-report&h=47&w=47&mask=circle&maxage=7d "@deyvisml")](https://github.com/deyvisml)
304
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/150537240?first-contrib=2023.11.15-regenerate-btn-changed-bug-email&h=47&w=47&mask=circle&maxage=7d "@philly88r")](https://github.com/philly88r)
305
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/9730392?first-contrib=2023.12.18-get-response-from-dom-request&h=47&w=47&mask=circle&maxage=7d "@thomasgauthier")](https://github.com/thomasgauthier)
306
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/42911524?first-contrib=2024.1.17-add-custom-gpt-support&h=47&w=47&mask=circle&maxage=7d "@pranav-bhatt")](https://github.com/pranav-bhatt)
307
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/13976824?first-contrib=2024.01.31-aria-labels-unreliable-bug-report&h=47&w=47&mask=circle&maxage=7d "@hopana")](https://github.com/hopana)
308
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/26219737?first-contrib=2024.2.2-data-key-message-bug-fix&h=47&w=47&mask=circle&maxage=7d "@emtry")](https://github.com/emtry)
309
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/44357327?first-contrib=2024.2.14-msg-fetching-for-localization-fails-report&h=47&w=47&mask=circle&maxage=7d "@thedayofcondor")](https://github.com/thedayofcondor)
310
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/111466842?first-contrib=2024.2.15-add-en-gb-locale&h=47&w=47&mask=circle&maxage=7d "@Luwa-Tech")](https://github.com/Luwa-Tech)
311
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/61795?first-contrib=2024.5.9-update-css-selector-for-getregeneratebutton&h=47&w=47&mask=circle&maxage=7d "@micz")](https://github.com/micz)
312
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/17583722?first-contrib=2024.5.17-chrome-starter-manifest-matches-outdated-alert&h=47&w=47&mask=circle&maxage=7d "@imranaalam")](https://github.com/imranaalam)
313
+ [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/in/29110&h=47&w=47&mask=circle&maxage=7d "Dependabot")](https://github.com/dependabot)
314
+ <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>
315
+ <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>
308
316
  [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/31427850?h=51&w=51&mask=circle&maxage=7d "@ImgBotApp")](https://github.com/ImgBotApp)
309
317
 
310
318
  </div><br>
@@ -335,7 +343,7 @@ This library exists thanks to code, translations, issues & ideas from the follow
335
343
  <div align="center">
336
344
 
337
345
  **[Releases](https://github.com/KudoAI/chatgpt.js/releases)** /
338
- [Userguide](https://github.com/KudoAI/chatgpt.js/blob/v2.9.1/docs/USERGUIDE.md) /
346
+ [Userguide](https://github.com/KudoAI/chatgpt.js/blob/v2.9.3/docs/USERGUIDE.md) /
339
347
  [Discuss](https://github.com/KudoAI/chatgpt.js/discussions) /
340
348
  <a href="#--------------------------------------------------------------------------------english---------简体中文---------繁體中文---------日本---------한국인---------हिंदी---------नेपाली---------deutsch---------español---------français---------italiano---------nederlands---------português---------việt----">Back to top ↑</a>
341
349
 
package/chatgpt.js CHANGED
@@ -147,7 +147,7 @@ const chatgpt = { // eslint-disable-line no-redeclare
147
147
 
148
148
  // Insert text into elements
149
149
  modalTitle.innerText = title || '';
150
- modalMessage.innerText = msg || ''; this.renderHTML(modalMessage);
150
+ modalMessage.innerText = msg || ''; chatgpt.renderHTML(modalMessage);
151
151
 
152
152
  // Create/append buttons (if provided) to buttons div
153
153
  const modalButtons = document.createElement('div');
@@ -400,7 +400,7 @@ const chatgpt = { // eslint-disable-line no-redeclare
400
400
  } catch (err) {
401
401
  console.error(err.message);
402
402
  if (arguments.length == 0) {
403
- console.info('Using backend API method instead.'); this.clearChats('api'); }
403
+ console.info('Using backend API method instead.'); chatgpt.clearChats('api'); }
404
404
  }
405
405
 
406
406
  } else { // API method
@@ -497,7 +497,7 @@ const chatgpt = { // eslint-disable-line no-redeclare
497
497
  }
498
498
  },
499
499
 
500
- continue: function() { this.response.continue(); },
500
+ continue: function() { chatgpt.response.continue(); },
501
501
 
502
502
  detectLanguage: async function(text) {
503
503
  if (!text) return console.error('Text argument not supplied. Pass some text!');
@@ -869,7 +869,8 @@ const chatgpt = { // eslint-disable-line no-redeclare
869
869
 
870
870
  getNewChatButton: function() {
871
871
  for (const navBtnSVG of document.querySelectorAll('nav button svg'))
872
- if (navBtnSVG.querySelector('path[d*="M15.673 3.913a3.121"]')) // new chat icon found
872
+ if (navBtnSVG.querySelector('path[d*="M15.673 3.913a3.121"], ' // pencil-on-pad icon
873
+ + 'path[d*="M3.07 10.876C3.623"]')) // refresh icon if temp chat
873
874
  return navBtnSVG.parentNode;
874
875
  },
875
876
 
@@ -917,7 +918,7 @@ const chatgpt = { // eslint-disable-line no-redeclare
917
918
  return new Promise(resolve => {
918
919
  (function checkChatHistory() {
919
920
  if (document.querySelector('nav')) resolve(true);
920
- else setTimeout(checkChatHistory, 100);
921
+ else setTimeout(checkChatHistory, 200);
921
922
  })();
922
923
  });}
923
924
  },
@@ -1056,7 +1057,7 @@ const chatgpt = { // eslint-disable-line no-redeclare
1056
1057
  return new Promise(resolve => {
1057
1058
  (function checkIsIdle() {
1058
1059
  if (chatgpt.getRegenerateButton()) resolve(true);
1059
- else setTimeout(checkIsIdle, 100);
1060
+ else setTimeout(checkIsIdle, 200);
1060
1061
  })();
1061
1062
  });},
1062
1063
 
@@ -1064,7 +1065,7 @@ const chatgpt = { // eslint-disable-line no-redeclare
1064
1065
  return new Promise(resolve => {
1065
1066
  (function checkIsLoaded() {
1066
1067
  if (chatgpt.getNewChatButton()) resolve(true);
1067
- else setTimeout(checkIsLoaded, 100);
1068
+ else setTimeout(checkIsLoaded, 200);
1068
1069
  })();
1069
1070
  });},
1070
1071
 
@@ -1367,9 +1368,9 @@ const chatgpt = { // eslint-disable-line no-redeclare
1367
1368
  nodeContent = node.childNodes;
1368
1369
 
1369
1370
  // Preserve consecutive spaces + line breaks
1370
- if (!this.renderHTML.preWrapSet) {
1371
- node.style.whiteSpace = 'pre-wrap'; this.renderHTML.preWrapSet = true;
1372
- setTimeout(() => { this.renderHTML.preWrapSet = false; }, 100);
1371
+ if (!chatgpt.renderHTML.preWrapSet) {
1372
+ node.style.whiteSpace = 'pre-wrap'; chatgpt.renderHTML.preWrapSet = true;
1373
+ setTimeout(() => { chatgpt.renderHTML.preWrapSet = false; }, 100);
1373
1374
  }
1374
1375
 
1375
1376
  // Process child nodes
@@ -1393,7 +1394,7 @@ const chatgpt = { // eslint-disable-line no-redeclare
1393
1394
  tagNode.setAttribute(name, value);
1394
1395
  });
1395
1396
 
1396
- const renderedNode = this.renderHTML(tagNode); // render child elements of newly created node
1397
+ const renderedNode = chatgpt.renderHTML(tagNode); // render child elements of newly created node
1397
1398
 
1398
1399
  // Insert newly rendered node
1399
1400
  const beforeTextNode = document.createTextNode(text.substring(0, elem.index)),
@@ -1406,7 +1407,7 @@ const chatgpt = { // eslint-disable-line no-redeclare
1406
1407
  }
1407
1408
 
1408
1409
  // Process element nodes recursively
1409
- } else if (childNode.nodeType == Node.ELEMENT_NODE) this.renderHTML(childNode);
1410
+ } else if (childNode.nodeType == Node.ELEMENT_NODE) chatgpt.renderHTML(childNode);
1410
1411
  }
1411
1412
 
1412
1413
  return node; // if assignment used
@@ -1485,7 +1486,7 @@ const chatgpt = { // eslint-disable-line no-redeclare
1485
1486
  for (let i = 0; i < arguments.length; i++) if (typeof arguments[i] !== 'string')
1486
1487
  return console.error(`Argument ${ i + 1 } must be a string!`);
1487
1488
  const textArea = document.querySelector('form textarea'),
1488
- sendBtn = this.getSendButton();
1489
+ sendBtn = chatgpt.getSendButton();
1489
1490
  textArea.value = msg;
1490
1491
  textArea.dispatchEvent(new Event('input', { bubbles: true })); // enable send button
1491
1492
 
@@ -1761,17 +1762,22 @@ const chatgpt = { // eslint-disable-line no-redeclare
1761
1762
  if (isToggleBtn(btn)) { btn.click(); return; }
1762
1763
  },
1763
1764
 
1764
- isLoaded: function() {
1765
- return new Promise(resolve => {
1766
- (function checkIsLoaded() {
1767
- if (document.querySelector('nav a[href="/"]')) resolve(true);
1768
- else setTimeout(checkIsLoaded, 100);
1769
- })();
1770
- });}
1765
+ isLoaded: async function() {
1766
+ await chatgpt.isLoaded();
1767
+ return Promise.race([
1768
+ new Promise(resolve => {
1769
+ (function checkNewChatLink() {
1770
+ if (chatgpt.getNewChatLink()) resolve(true);
1771
+ else setTimeout(checkNewChatLink, 200);
1772
+ })();
1773
+ }),
1774
+ new Promise(resolve => setTimeout(resolve, 5000)) // since New Chat link not always present
1775
+ ]);
1776
+ }
1771
1777
  },
1772
1778
 
1773
- startNewChat: function() { try { this.getNewChatBtn().click(); } catch (err) { console.error(err.message); }},
1774
- stop: function() { this.response.stopGenerating(); },
1779
+ startNewChat: function() { try { chatgpt.getNewChatBtn().click(); } catch (err) { console.error(err.message); }},
1780
+ stop: function() { chatgpt.response.stopGenerating(); },
1775
1781
 
1776
1782
  suggest: async function(ideaType, details) {
1777
1783
  if (!ideaType) return console.error('ideaType (1st argument) not supplied'