@kudoai/chatgpt.js 2.6.9 → 2.7.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 +28 -26
- package/chatgpt.js +26 -43
- package/dist/chatgpt.min.js +3 -3
- package/docs/README.md +28 -26
- package/docs/USERGUIDE.md +94 -14
- package/package.json +5 -5
- package/starters/chrome/LICENSE.md +2 -2
- package/starters/chrome/docs/README.md +2 -2
- package/starters/chrome/docs/SECURITY.md +2 -2
- package/starters/chrome/extension/lib/chatgpt.js +26 -43
- package/starters/chrome/extension/manifest.json +1 -1
- package/starters/chrome/extension/popup/index.html +1 -1
- package/starters/chrome/extension/popup/popup.js +1 -1
- package/starters/docs/README.md +1 -1
- package/starters/greasemonkey/LICENSE.md +2 -2
- package/starters/greasemonkey/chatgpt.js-greasemonkey-starter.user.js +2 -2
- package/starters/greasemonkey/docs/SECURITY.md +2 -2
package/README.md
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<h6>
|
|
5
5
|
<a href="https://github.com/KudoAI/chatgpt.js/tree/main/docs">
|
|
6
6
|
<picture>
|
|
7
|
-
<source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://
|
|
8
|
-
<img src="https://
|
|
7
|
+
<source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://media.chatgptjs.org/images/icons/earth-americas-white-padded-icon17x15.svg?714b6a1">
|
|
8
|
+
<img src="https://media.chatgptjs.org/images/icons/earth-americas-padded-icon17x15.svg?714b6a1">
|
|
9
9
|
</picture>
|
|
10
10
|
</a>
|
|
11
11
|
English |
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
|
|
30
30
|
<a href="https://chatgpt.js.org">
|
|
31
31
|
<picture>
|
|
32
|
-
<source type="image/png" media="(prefers-color-scheme: dark)" srcset="https://
|
|
33
|
-
<img width=800 src="https://
|
|
32
|
+
<source type="image/png" media="(prefers-color-scheme: dark)" srcset="https://media.chatgptjs.org/images/logos/chatgpt.js/with-reflection/darkmode.png?bc68d0c">
|
|
33
|
+
<img width=800 src="https://media.chatgptjs.org/images/logos/chatgpt.js/with-reflection/lightmode.png?bc68d0c">
|
|
34
34
|
</picture>
|
|
35
35
|
</a>
|
|
36
36
|
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
[](https://github.com/KudoAI/chatgpt.js/stargazers)
|
|
46
46
|
[](https://github.com/KudoAI/chatgpt.js/blob/main/LICENSE.md)
|
|
47
47
|
[](https://github.com/KudoAI/chatgpt.js/commits/main)
|
|
48
|
-

|
|
48
|
+
[](https://github.com/KudoAI/chatgpt.js/tree/v2.7.0/dist/chatgpt.min.js)
|
|
49
49
|
[](https://www.codefactor.io/repository/github/kudoai/chatgpt.js)
|
|
50
50
|
[](https://sonarcloud.io/component_measures?metric=new_vulnerabilities&id=kudoai_chatgpt.js)
|
|
51
51
|
[](https://github.com/sindresorhus/awesome-chatgpt#javascript)
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
|
|
55
55
|
</div>
|
|
56
56
|
|
|
57
|
-
<img height=8px width="100%" src="https://
|
|
57
|
+
<img height=8px width="100%" src="https://cdn.jsdelivr.net/gh/KudoAI/chatgpt.js@5e41346/docs/assets/images/aqua-separator.png">
|
|
58
58
|
|
|
59
59
|
<div id="intro">
|
|
60
60
|
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
- Easy-to-use
|
|
70
70
|
- Lightweight (yet optimally performant)
|
|
71
71
|
|
|
72
|
-
<img height=8px width="100%" src="https://
|
|
72
|
+
<img height=8px width="100%" src="https://cdn.jsdelivr.net/gh/KudoAI/chatgpt.js@5e41346/docs/assets/images/aqua-separator.png">
|
|
73
73
|
|
|
74
74
|
<div id="importing">
|
|
75
75
|
|
|
@@ -77,13 +77,13 @@
|
|
|
77
77
|
|
|
78
78
|
</div>
|
|
79
79
|
|
|
80
|
-
> **Note** _To always import the latest version (
|
|
80
|
+
> **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`_
|
|
81
81
|
|
|
82
82
|
### ES6:
|
|
83
83
|
|
|
84
84
|
```js
|
|
85
85
|
(async () => {
|
|
86
|
-
await import('https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.
|
|
86
|
+
await import('https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.7.0/dist/chatgpt.min.js');
|
|
87
87
|
// Your code here...
|
|
88
88
|
})();
|
|
89
89
|
```
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
|
|
93
93
|
```js
|
|
94
94
|
var xhr = new XMLHttpRequest();
|
|
95
|
-
xhr.open('GET', 'https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.
|
|
95
|
+
xhr.open('GET', 'https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.7.0/dist/chatgpt.min.js');
|
|
96
96
|
xhr.onload = function () {
|
|
97
97
|
if (xhr.status === 200) {
|
|
98
98
|
var chatgptJS = document.createElement('script');
|
|
@@ -108,13 +108,13 @@ function yourCode() {
|
|
|
108
108
|
}
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
-
### <img style="margin: 0 2px -0.065rem 0" height=17 src="https://
|
|
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
112
|
|
|
113
113
|
> **Note** _To use a starter template: [kudoai/chatgpt.js-greasemonkey-starter](https://github.com/KudoAI/chatgpt.js-greasemonkey-starter)_
|
|
114
114
|
|
|
115
115
|
```js
|
|
116
116
|
...
|
|
117
|
-
// @require https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.
|
|
117
|
+
// @require https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.7.0/dist/chatgpt.min.js
|
|
118
118
|
// ==/UserScript==
|
|
119
119
|
|
|
120
120
|
// Your code here...
|
|
@@ -150,7 +150,7 @@ export { chatgpt }
|
|
|
150
150
|
})();
|
|
151
151
|
```
|
|
152
152
|
|
|
153
|
-
<img height=8px width="100%" src="https://
|
|
153
|
+
<img height=8px width="100%" src="https://cdn.jsdelivr.net/gh/KudoAI/chatgpt.js@5e41346/docs/assets/images/aqua-separator.png">
|
|
154
154
|
|
|
155
155
|
<div id="npm">
|
|
156
156
|
|
|
@@ -164,11 +164,11 @@ To download **chatgpt.js** for local customization, run the following command in
|
|
|
164
164
|
npm install @kudoai/chatgpt.js
|
|
165
165
|
```
|
|
166
166
|
|
|
167
|
-
After installation, navigate to `node_modules/@kudoai/chatgpt.js` to find the library source
|
|
167
|
+
After installation, navigate to `node_modules/@kudoai/chatgpt.js` to find the library source.
|
|
168
168
|
|
|
169
169
|
</div>
|
|
170
170
|
|
|
171
|
-
<img height=8px width="100%" src="https://
|
|
171
|
+
<img height=8px width="100%" src="https://cdn.jsdelivr.net/gh/KudoAI/chatgpt.js@5e41346/docs/assets/images/aqua-separator.png">
|
|
172
172
|
|
|
173
173
|
<div id="usage">
|
|
174
174
|
|
|
@@ -189,9 +189,9 @@ chatgpt.get('reply', 'last');
|
|
|
189
189
|
|
|
190
190
|
Each call equally fetches the last response. If you think it works, it probably will... so just type it!
|
|
191
191
|
|
|
192
|
-
If it didn't, check out the extended [userguide](https://github.com/KudoAI/chatgpt.js/blob/
|
|
192
|
+
If it didn't, check out the extended [userguide](https://github.com/KudoAI/chatgpt.js/blob/v2.7.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!
|
|
193
193
|
|
|
194
|
-
<img height=8px width="100%" src="https://
|
|
194
|
+
<img height=8px width="100%" src="https://cdn.jsdelivr.net/gh/KudoAI/chatgpt.js@5e41346/docs/assets/images/aqua-separator.png">
|
|
195
195
|
|
|
196
196
|
<div id="showcase">
|
|
197
197
|
|
|
@@ -263,7 +263,7 @@ https://github.com/KudoAI/chatgpt.js/assets/10906554/f53c740f-d5e0-49b6-ae02-3b3
|
|
|
263
263
|
If you've made something w/ chatgpt.js you want to share, email <a href="mailto:showcase@chatgptjs.org">showcase@chatgptjs.org</a> or just open a <a href="https://github.com/KudoAI/chatgpt.js/pulls" target="_blank" rel="noopener">pull request</a>!
|
|
264
264
|
</p>
|
|
265
265
|
|
|
266
|
-
<img height=8px width="100%" src="https://
|
|
266
|
+
<img height=8px width="100%" src="https://cdn.jsdelivr.net/gh/KudoAI/chatgpt.js@5e41346/docs/assets/images/aqua-separator.png">
|
|
267
267
|
|
|
268
268
|
<div id="contributors">
|
|
269
269
|
|
|
@@ -298,15 +298,17 @@ This library exists thanks to code, translations, issues & ideas from the follow
|
|
|
298
298
|
[](https://github.com/pranav-bhatt)
|
|
299
299
|
[](https://github.com/hopana)
|
|
300
300
|
[](https://github.com/emtry)
|
|
301
|
+
[](https://github.com/thedayofcondor)
|
|
301
302
|
[](https://github.com/Luwa-Tech)
|
|
303
|
+
[](https://github.com/micz)
|
|
302
304
|
[](https://github.com/dependabot)
|
|
303
|
-
|
|
304
|
-
|
|
305
|
+
<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>
|
|
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/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>
|
|
305
307
|
[](https://github.com/ImgBotApp)
|
|
306
308
|
|
|
307
309
|
</div><br>
|
|
308
310
|
|
|
309
|
-
<img height=8px width="100%" src="https://
|
|
311
|
+
<img height=8px width="100%" src="https://cdn.jsdelivr.net/gh/KudoAI/chatgpt.js@5e41346/docs/assets/images/aqua-separator.png">
|
|
310
312
|
|
|
311
313
|
<div id="partners">
|
|
312
314
|
|
|
@@ -319,20 +321,20 @@ This library exists thanks to code, translations, issues & ideas from the follow
|
|
|
319
321
|
<div id="partners-collage" align="center">
|
|
320
322
|
|
|
321
323
|
<picture>
|
|
322
|
-
<source type="image/png" media="(prefers-color-scheme: dark)" srcset="https://
|
|
323
|
-
<img width=888 src="https://
|
|
324
|
+
<source type="image/png" media="(prefers-color-scheme: dark)" srcset="https://media.chatgptjs.org/images/logos/partners/collage/white.png?3109608">
|
|
325
|
+
<img width=888 src="https://media.chatgptjs.org/images/logos/partners/collage/black.png?3109608">
|
|
324
326
|
</picture>
|
|
325
327
|
|
|
326
328
|
</div>
|
|
327
329
|
|
|
328
330
|
<br>
|
|
329
331
|
|
|
330
|
-
<img height=8px width="100%" src="https://
|
|
332
|
+
<img height=8px width="100%" src="https://cdn.jsdelivr.net/gh/KudoAI/chatgpt.js@5e41346/docs/assets/images/aqua-separator.png">
|
|
331
333
|
|
|
332
334
|
<div align="center">
|
|
333
335
|
|
|
334
|
-
**[Releases](https://
|
|
335
|
-
[Userguide](https://github.com/KudoAI/chatgpt.js/blob/
|
|
336
|
+
**[Releases](https://github.com/KudoAI/chatgpt.js/releases)** /
|
|
337
|
+
[Userguide](https://github.com/KudoAI/chatgpt.js/blob/v2.7.0/docs/USERGUIDE.md) /
|
|
336
338
|
[Discuss](https://github.com/KudoAI/chatgpt.js/discussions) /
|
|
337
339
|
<a href="#--------------------------------------------------------------------------------english---------简体中文---------繁體中文---------日本---------한국인---------हिंदी---------नेपाली---------deutsch---------español---------français---------italiano---------nederlands---------português---------việt----">Back to top ↑</a>
|
|
338
340
|
|
package/chatgpt.js
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
// Init endpoints
|
|
7
7
|
const endpoints = {
|
|
8
|
-
assets: 'https://
|
|
8
|
+
assets: 'https://cdn.jsdelivr.net/gh/KudoAI/chatgpt.js',
|
|
9
9
|
openAI: {
|
|
10
|
-
session: 'https://
|
|
10
|
+
session: 'https://chatgpt.com/api/auth/session',
|
|
11
11
|
chats: 'https://chat.openai.com/backend-api/conversations',
|
|
12
12
|
chat: 'https://chat.openai.com/backend-api/conversation',
|
|
13
13
|
share_create: 'https://chat.openai.com/backend-api/share/create',
|
|
@@ -18,14 +18,7 @@ const endpoints = {
|
|
|
18
18
|
|
|
19
19
|
// Init feedback properties
|
|
20
20
|
localStorage.alertQueue = JSON.stringify([]);
|
|
21
|
-
localStorage.notifyProps = JSON.stringify({
|
|
22
|
-
queue: { topRight: [], bottomRight: [], bottomLeft: [], topLeft: [] },
|
|
23
|
-
lastNthAudio: 0 // to prevent immediate repetition of base sound
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
// Init environment flags
|
|
27
|
-
const isFFuserScript = navigator.userAgent.includes('Firefox') && typeof unsafeWindow != 'undefined',
|
|
28
|
-
isFFtmScript = isFFuserScript && GM_info.scriptHandler == 'Tampermonkey';
|
|
21
|
+
localStorage.notifyProps = JSON.stringify({ queue: { topRight: [], bottomRight: [], bottomLeft: [], topLeft: [] }});
|
|
29
22
|
|
|
30
23
|
// Define chatgpt.methods
|
|
31
24
|
const chatgpt = { // eslint-disable-line no-redeclare
|
|
@@ -865,6 +858,8 @@ const chatgpt = { // eslint-disable-line no-redeclare
|
|
|
865
858
|
return svg.parentNode.parentNode;
|
|
866
859
|
}},
|
|
867
860
|
|
|
861
|
+
getFooterDiv: function() { return document.querySelector('main form').parentNode.parentNode.nextElementSibling; },
|
|
862
|
+
getHeaderDiv: function() { return document.querySelector('main .sticky'); },
|
|
868
863
|
getLastPrompt: function() { return chatgpt.getChatData('active', 'msg', 'user', 'latest'); },
|
|
869
864
|
getLastResponse: function() { return chatgpt.getChatData('active', 'msg', 'chatgpt', 'latest'); },
|
|
870
865
|
|
|
@@ -876,8 +871,8 @@ const chatgpt = { // eslint-disable-line no-redeclare
|
|
|
876
871
|
|
|
877
872
|
getRegenerateButton: function() {
|
|
878
873
|
for (const mainSVG of document.querySelectorAll('main svg')) {
|
|
879
|
-
if (mainSVG.querySelector('path[d*="
|
|
880
|
-
return mainSVG.parentNode
|
|
874
|
+
if (mainSVG.querySelector('path[d*="M3.07 10.876C3.623"]')) // regen icon found
|
|
875
|
+
return mainSVG.parentNode;
|
|
881
876
|
}},
|
|
882
877
|
|
|
883
878
|
getResponse: function() {
|
|
@@ -893,6 +888,7 @@ const chatgpt = { // eslint-disable-line no-redeclare
|
|
|
893
888
|
|
|
894
889
|
getResponseFromAPI: function(chatToGet, responseToGet) { return chatgpt.response.getFromAPI(chatToGet, responseToGet); },
|
|
895
890
|
getResponseFromDOM: function(pos) { return chatgpt.response.getFromDOM(pos); },
|
|
891
|
+
getScrollToBottomButton: function() { return document.querySelector('button[class*="cursor"][class*="bottom"]'); },
|
|
896
892
|
getSendButton: function() { return document.querySelector('form button[class*="bottom"]'); },
|
|
897
893
|
|
|
898
894
|
getStopGeneratingButton: function() {
|
|
@@ -905,6 +901,9 @@ const chatgpt = { // eslint-disable-line no-redeclare
|
|
|
905
901
|
return navigator.languages[0] || navigator.language || navigator.browserLanguage ||
|
|
906
902
|
navigator.systemLanguage || navigator.userLanguage || ''; },
|
|
907
903
|
|
|
904
|
+
hideFooter: function() { chatgpt.getFooterDiv().style.display = 'none'; },
|
|
905
|
+
hideHeader: function() { chatgpt.getHeaderDiv().style.display = 'none'; },
|
|
906
|
+
|
|
908
907
|
history: {
|
|
909
908
|
isLoaded: function() {
|
|
910
909
|
return new Promise(resolve => {
|
|
@@ -1263,28 +1262,10 @@ const chatgpt = { // eslint-disable-line no-redeclare
|
|
|
1263
1262
|
const hideDelay = fadeDuration > notifDuration ? 0 // don't delay if fade exceeds notification duration
|
|
1264
1263
|
: notifDuration - fadeDuration; // otherwise delay for difference
|
|
1265
1264
|
|
|
1266
|
-
// Init/schedule audio feedback
|
|
1267
|
-
let dismissAudio, dismissAudioTID; // be accessible to `dismissNotif()`
|
|
1268
|
-
if (isFFtmScript) {
|
|
1269
|
-
// Init base audio index
|
|
1270
|
-
let nthAudio; do nthAudio = Math.floor(Math.random() * 3) + 1; // randomize between 1-3...
|
|
1271
|
-
while (nthAudio === notifyProps.lastNthAudio); // ...until distinct from prev index (for variety)
|
|
1272
|
-
notifyProps.lastNthAudio = nthAudio; localStorage.notifyProps = JSON.stringify(notifyProps);
|
|
1273
|
-
|
|
1274
|
-
// Build audio element + src URL
|
|
1275
|
-
dismissAudio = new Audio();
|
|
1276
|
-
dismissAudio.src = endpoints.assets + '/media/audio/notifications/bubble-pop/'
|
|
1277
|
-
+ `${ nthAudio }-${ notificationDiv.isRight ? 'right' : 'left' }.mp3`;
|
|
1278
|
-
|
|
1279
|
-
// Schedule playback
|
|
1280
|
-
dismissAudioTID = setTimeout(() => dismissAudio.play().catch(() => {}), hideDelay * 1000);
|
|
1281
|
-
}
|
|
1282
|
-
|
|
1283
1265
|
// Add notification dismissal to timeout schedule + button clicks
|
|
1284
1266
|
const dismissNotif = () => {
|
|
1285
1267
|
notificationDiv.style.animation = `notif-zoom-fade-out ${ fadeDuration }s ease-out`;
|
|
1286
|
-
|
|
1287
|
-
clearTimeout(dismissFuncTID); clearTimeout(dismissAudioTID);
|
|
1268
|
+
clearTimeout(dismissFuncTID);
|
|
1288
1269
|
};
|
|
1289
1270
|
const dismissFuncTID = setTimeout(dismissNotif, hideDelay * 1000); // maintain visibility for `hideDelay` secs, then dismiss
|
|
1290
1271
|
closeSVG.addEventListener('click', dismissNotif, { once: true }); // add to close button clicks
|
|
@@ -1373,12 +1354,7 @@ const chatgpt = { // eslint-disable-line no-redeclare
|
|
|
1373
1354
|
},
|
|
1374
1355
|
|
|
1375
1356
|
refactor: function() { chatgpt.code.refactor(); },
|
|
1376
|
-
|
|
1377
|
-
regenerate: function() {
|
|
1378
|
-
for (const formButton of document.querySelectorAll('form button')) {
|
|
1379
|
-
if (formButton.textContent.toLowerCase().includes('regenerate')) {
|
|
1380
|
-
formButton.click(); return;
|
|
1381
|
-
}}},
|
|
1357
|
+
regenerate: function() { chatgpt.response.regenerate(); },
|
|
1382
1358
|
|
|
1383
1359
|
renderHTML: function(node) {
|
|
1384
1360
|
const reTags = /<([a-z\d]+)\b([^>]*)>([\s\S]*?)<\/\1>/g,
|
|
@@ -1493,10 +1469,10 @@ const chatgpt = { // eslint-disable-line no-redeclare
|
|
|
1493
1469
|
getLast: function() { return chatgpt.getChatData('active', 'msg', 'chatgpt', 'latest'); },
|
|
1494
1470
|
|
|
1495
1471
|
regenerate: function() {
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
}
|
|
1472
|
+
const regenBtn = chatgpt.getRegenerateButton();
|
|
1473
|
+
if (regenBtn) regenBtn.click();
|
|
1474
|
+
else console.error('Regenerate button not found!');
|
|
1475
|
+
},
|
|
1500
1476
|
|
|
1501
1477
|
stopGenerating: function() {
|
|
1502
1478
|
for (const svg of document.querySelectorAll('form button svg')) {
|
|
@@ -1508,8 +1484,9 @@ const chatgpt = { // eslint-disable-line no-redeclare
|
|
|
1508
1484
|
reviewCode: function() { chatgpt.code.review(); },
|
|
1509
1485
|
|
|
1510
1486
|
scrollToBottom: function() {
|
|
1511
|
-
|
|
1512
|
-
|
|
1487
|
+
const scrollBtn = chatgpt.getScrollToBottomButton();
|
|
1488
|
+
if (scrollBtn) scrollBtn.click();
|
|
1489
|
+
else console.error('Scroll button not found!');
|
|
1513
1490
|
},
|
|
1514
1491
|
|
|
1515
1492
|
send: function(msg, method='') {
|
|
@@ -1657,6 +1634,9 @@ const chatgpt = { // eslint-disable-line no-redeclare
|
|
|
1657
1634
|
});});});});});
|
|
1658
1635
|
},
|
|
1659
1636
|
|
|
1637
|
+
showFooter: function() { chatgpt.getFooterDiv().style.display = 'revert'; },
|
|
1638
|
+
showHeader: function() { chatgpt.getHeaderDiv().style.display = 'flex'; },
|
|
1639
|
+
|
|
1660
1640
|
sidebar: {
|
|
1661
1641
|
elements: [], observer: {},
|
|
1662
1642
|
|
|
@@ -1905,6 +1885,8 @@ const functionAliases = [
|
|
|
1905
1885
|
['detectLanguage', 'getLanguage'],
|
|
1906
1886
|
['executeCode', 'codeExecute'],
|
|
1907
1887
|
['exportChat', 'chatExport', 'export'],
|
|
1888
|
+
['getFooterDiv', 'getFooter'],
|
|
1889
|
+
['getHeaderDiv', 'getHeader'],
|
|
1908
1890
|
['getLastPrompt', 'getLastQuery', 'getMyLastMsg', 'getMyLastQuery'],
|
|
1909
1891
|
['getTextarea', 'getTextArea', 'getChatbox', 'getChatBox'],
|
|
1910
1892
|
['isFullScreen', 'isFullscreen'],
|
|
@@ -1934,6 +1916,7 @@ const synonyms = [
|
|
|
1934
1916
|
['activate', 'turnOn'],
|
|
1935
1917
|
['analyze', 'check', 'evaluate', 'review'],
|
|
1936
1918
|
['ask', 'send', 'submit'],
|
|
1919
|
+
['button', 'btn'],
|
|
1937
1920
|
['chat', 'conversation', 'convo'],
|
|
1938
1921
|
['data', 'details'],
|
|
1939
1922
|
['deactivate', 'deActivate', 'turnOff'],
|