@kudoai/chatgpt.js 3.8.2 → 3.8.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 +7 -7
- package/chatgpt.js +1 -1
- package/dist/chatgpt.min.js +2 -2
- package/docs/README.md +7 -7
- package/docs/USERGUIDE.md +3 -3
- package/package.json +7 -7
- package/starters/chrome/extension/lib/chatgpt.js +1 -1
- package/starters/chrome/extension/manifest.json +1 -1
- package/starters/greasemonkey/chatgpt.js-greasemonkey-starter.user.js +2 -2
package/README.md
CHANGED
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
<img src="https://img.shields.io/badge/License-MIT-fc4f2d.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
52
52
|
<a href="https://www.npmjs.com/package/@kudoai/chatgpt.js/v/latest" target="_blank" rel="noopener">
|
|
53
53
|
<img src="https://img.shields.io/npm/v/%40kudoai%2Fchatgpt.js?logo=npm&logoColor=white&labelColor=464646&color=blue&style=for-the-badge&label=Latest+Release"></a>
|
|
54
|
-
<a href="https://github.com/KudoAI/chatgpt.js/tree/v3.8.
|
|
55
|
-
<img src="https://img.shields.io/github/size/KudoAI/chatgpt.js/dist/chatgpt.min.js?branch=v3.8.
|
|
54
|
+
<a href="https://github.com/KudoAI/chatgpt.js/tree/v3.8.3/dist/chatgpt.min.js" target="_blank" rel="noopener">
|
|
55
|
+
<img src="https://img.shields.io/github/size/KudoAI/chatgpt.js/dist/chatgpt.min.js?branch=v3.8.3&label=Minified%20Size&logo=databricks&logoColor=white&labelColor=464646&color=ff69b4&style=for-the-badge"></a>
|
|
56
56
|
<a href="https://www.codefactor.io/repository/github/kudoai/chatgpt.js" target="_blank" rel="noopener">
|
|
57
57
|
<img src="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"></a>
|
|
58
58
|
<a href="https://sonarcloud.io/component_measures?metric=new_vulnerabilities&id=kudoai_chatgpt.js" target="_blank" rel="noopener">
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
|
|
121
121
|
```js
|
|
122
122
|
(async () => {
|
|
123
|
-
await import('https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.8.
|
|
123
|
+
await import('https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.8.3/dist/chatgpt.min.js');
|
|
124
124
|
// Your code here...
|
|
125
125
|
})();
|
|
126
126
|
```
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
|
|
130
130
|
```js
|
|
131
131
|
var xhr = new XMLHttpRequest();
|
|
132
|
-
xhr.open('GET', 'https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.8.
|
|
132
|
+
xhr.open('GET', 'https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.8.3/dist/chatgpt.min.js');
|
|
133
133
|
xhr.onload = function () {
|
|
134
134
|
if (xhr.status === 200) {
|
|
135
135
|
var chatgptJS = document.createElement('script');
|
|
@@ -152,7 +152,7 @@ function yourCode() {
|
|
|
152
152
|
|
|
153
153
|
```js
|
|
154
154
|
...
|
|
155
|
-
// @require https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.8.
|
|
155
|
+
// @require https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.8.3/dist/chatgpt.min.js
|
|
156
156
|
// ==/UserScript==
|
|
157
157
|
|
|
158
158
|
// Your code here...
|
|
@@ -222,7 +222,7 @@ chatgpt.get('reply', 'last');
|
|
|
222
222
|
|
|
223
223
|
Each call equally fetches the last response. If you think it works, it probably will... so just type it!
|
|
224
224
|
|
|
225
|
-
If it didn't, check out the extended [userguide](https://github.com/KudoAI/chatgpt.js/blob/v3.8.
|
|
225
|
+
If it didn't, check out the extended [userguide](https://github.com/KudoAI/chatgpt.js/blob/v3.8.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!
|
|
226
226
|
|
|
227
227
|
<img height=8px width="100%" src="https://assets.chatgptjs.org/images/separators/gradient-aqua.png?v=e638eac">
|
|
228
228
|
|
|
@@ -480,7 +480,7 @@ This library exists thanks to code, translations, issues & ideas from the follow
|
|
|
480
480
|
<div align="center">
|
|
481
481
|
|
|
482
482
|
**[Releases](https://github.com/KudoAI/chatgpt.js/releases)** /
|
|
483
|
-
[Userguide](https://github.com/KudoAI/chatgpt.js/blob/v3.8.
|
|
483
|
+
[Userguide](https://github.com/KudoAI/chatgpt.js/blob/v3.8.3/docs/USERGUIDE.md) /
|
|
484
484
|
[Discuss](https://github.com/KudoAI/chatgpt.js/discussions) /
|
|
485
485
|
[Back to top ↑](#top)
|
|
486
486
|
|
package/chatgpt.js
CHANGED
|
@@ -1893,7 +1893,7 @@ const chatgpt = {
|
|
|
1893
1893
|
if (!sidebar) { return console.error('Sidebar element not found!') || false }
|
|
1894
1894
|
else return chatgpt.browser.isMobile() ?
|
|
1895
1895
|
document.documentElement.style.overflow == 'hidden'
|
|
1896
|
-
: sidebar.style.visibility != 'hidden' && sidebar.
|
|
1896
|
+
: sidebar.style.visibility != 'hidden' && parseInt(getComputedStyle(sidebar).width) > 150
|
|
1897
1897
|
},
|
|
1898
1898
|
|
|
1899
1899
|
toggle() {
|
package/dist/chatgpt.min.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* User guide: https://chatgptjs.org/userguide
|
|
5
5
|
* Latest minified release: https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js/chatgpt.min.js
|
|
6
6
|
*/
|
|
7
|
-
localStorage.alertQueue=JSON.stringify([]),localStorage.notifyProps=JSON.stringify({queue:{topRight:[],bottomRight:[],bottomLeft:[],topLeft:[]}});let chatgpt={endpoints:{assets:"https://cdn.jsdelivr.net/gh/KudoAI/chatgpt.js@
|
|
7
|
+
localStorage.alertQueue=JSON.stringify([]),localStorage.notifyProps=JSON.stringify({queue:{topRight:[],bottomRight:[],bottomLeft:[],topLeft:[]}});let chatgpt={endpoints:{assets:"https://cdn.jsdelivr.net/gh/KudoAI/chatgpt.js@e77f32aed824a20ca96e34231aeba5739b5eddca",openAI:{session:"https://chatgpt.com/api/auth/session",chats:"https://chatgpt.com/backend-api/conversations",chat:"https://chatgpt.com/backend-api/conversation",share_create:"https://chatgpt.com/backend-api/share/create",share:"https://chatgpt.com/backend-api/share",instructions:"https://chatgpt.com/backend-api/user_system_messages"}},selectors:{btns:{continue:'button:has(svg[class*=rotate] > path[d^="M4.47189"])',createImage:"button[data-testid=composer-create-image]",deepResearch:"button[data-testid=composer-deep-research]",login:"button[data-testid*=login]",newChat:'a[href="/"]:has(svg),button:has([d^="M3.06957"])',regen:'button[data-testid*=regenerate],div[role=menuitem] div:has(svg):has(path[d^="M3.06957"])',scroll:'button:has(> svg > path[d^="M12 21C11.7348"])',search:"button[data-testid=composer-button-search]",reason:"button[data-testid=composer-button-reason]",send:"button[data-testid=send-button]",sidebar:"div[style*=-sidebar-width] button[data-testid=close-sidebar-button], div[style*=-sidebar-rail-width] button[aria-controls=stage-slideover-sidebar]",stop:"button[data-testid=stop-button]",upload:'button:has(> svg > path[d^="M12 3C12.5523"])',voice:"button[data-testid*=composer-speech-button]"},chatDivs:{convo:"div[class*=thread]",msg:"div[data-message-author-role]",reply:"div[data-message-author-role=assistant]"},chatHistory:"div#history",errors:{toast:"div.toast-root",txt:"div[class*=text-error]"},footer:"div#thread-bottom-container > div:last-of-type > div, span.text-sm.leading-none",header:"header#page-header",links:{newChat:'nav a[href="/"]',sidebarItem:"nav a"},sidebar:"div#stage-slideover-sidebar, div.bg-token-sidebar-surface-primary",ssgManifest:'script[src*="_ssgManifest.js"]'},actAs(s){return new Promise((r,a)=>{let n=new XMLHttpRequest;n.open("GET","https://cdn.jsdelivr.net/gh/KudoAI/chat-prompts@e77f32aed824a20ca96e34231aeba5739b5eddca/dist/personas.min.json",!0),n.send(),n.onload=()=>{if(200!=n.status)return a("🤖 chatgpt.js >> Request failed. Cannot retrieve prompts data.");var e=JSON.parse(n.responseText).personas;if(s){var t=e.find(e=>e.title.toLowerCase()==s.toLowerCase());if(!t)return a(`🤖 chatgpt.js >> Persona '${s}' was not found!`);chatgpt.send(t.prompt,"click"),console.info(`Loading ${s} persona...`),chatgpt.isIdle().then(()=>console.info("Persona activated!"))}else{console.log("\n%c🤖 chatgpt.js personas\n","font-family: sans-serif ; font-size: xxx-large ; font-weight: bold");for(var o of e)console.log("%c"+o.title,"font-family: monospace ; font-size: larger ;")}return r()}})},activateDarkMode(){document.documentElement.classList.replace("light","dark"),document.documentElement.style.colorScheme=localStorage.theme="dark"},activateLightMode(){document.documentElement.classList.replace("dark","light"),document.documentElement.style.colorScheme=localStorage.theme="light"},alert(o,r,e,a,t){let n=chatgpt.isDarkMode()?"dark":"light",s=chatgpt.browser.isMobile(),i={dismiss:{click(e){e.target!=e.currentTarget&&!e.target.closest("[class*=-close-btn]")||f()},key(e){if(/^(?: |Space|Enter|Return|Esc)/.test(e.key)&&[32,13,27].includes(e.keyCode))for(var t of m){var t=document.getElementById(t);if(!t||"none"==t.style.display)return;e.key.startsWith("Esc")||27==e.keyCode?f():(t=t.querySelector(".modal-buttons").lastChild)&&(t.click(),e.preventDefault())}}},drag:{mousedown(e){var t;0==e.button&&/auto|default/.test(getComputedStyle(e.target).cursor)&&(chatgpt.draggingModal=e.currentTarget,e.preventDefault(),Object.assign(chatgpt.draggingModal.style,{transition:"0.1s",willChange:"transform",transform:"scale(1.05)"}),document.body.style.cursor="grabbing",[...chatgpt.draggingModal.children].forEach(e=>e.style.pointerEvents="none"),["mousemove","mouseup"].forEach(e=>document.addEventListener(e,i.drag[e])),t=chatgpt.draggingModal.getBoundingClientRect(),i.drag.offsetX=e.clientX-t.left+21,i.drag.offsetY=e.clientY-t.top+12)},mousemove(e){var t;chatgpt.draggingModal&&(t=e.clientX-i.drag.offsetX,e=e.clientY-i.drag.offsetY,Object.assign(chatgpt.draggingModal.style,{left:t+"px",top:e+"px"}))},mouseup(){Object.assign(chatgpt.draggingModal.style,{cursor:"inherit",transition:"inherit",willChange:"auto",transform:"scale(1)"}),document.body.style.cursor="",[...chatgpt.draggingModal.children].forEach(e=>e.style.pointerEvents=""),["mousemove","mouseup"].forEach(e=>document.removeEventListener(e,i.drag[e])),chatgpt.draggingModal=null}}},c=document.createElement("div"),l=(c.id=Math.floor(1e6*chatgpt.randomFloat())+Date.now(),c.classList.add("chatgpt-modal"),document.createElement("div")),d=document.createElement("h2"),g=document.createElement("p");var u=1739338889852;let h=document.querySelector("#chatgpt-modal-style"),p=((!h||parseInt(h.getAttribute("last-updated"),10)<u)&&(h||((h=document.createElement("style")).id="chatgpt-modal-style",h.setAttribute("last-updated",u.toString()),document.head.append(h)),h.textContent=`.chatgpt-modal { /* vars */
|
|
8
8
|
--transition: opacity 0.65s cubic-bezier(.165,.84,.44,1), /* for fade-in */
|
|
9
9
|
transform 0.55s cubic-bezier(.165,.84,.44,1) ; /* for move-in */
|
|
10
10
|
--bg-transition: background-color 0.25s ease ; /* for bg dim */
|
|
@@ -96,6 +96,6 @@ CHATGPT: ${l.chatgpt}
|
|
|
96
96
|
${"dark"==t?"border: 2px solid white ;":""}
|
|
97
97
|
margin-${i.isTop?"top: 42px":"bottom: 105px"};
|
|
98
98
|
transform: translate(-50%, -50%) scale(0.6) !important }
|
|
99
|
-
div.chatgpt-notif > div.notif-close-btn { top: 18px ; right: 7px ; transform: scale(2) }`),JSON.parse(localStorage.notifyProps));g.queue[i.quadrant].push(i.id),localStorage.notifyProps=JSON.stringify(g),i.style.top=i.isTop?23..toString()+"px":"",i.style.bottom=i.isTop?"":23..toString()+"px",i.style.right=i.isRight?27..toString()+"px":"",i.style.left=i.isRight?"":27..toString()+"px";e=g.queue[i.quadrant];if(1<e.length)try{for(var u of e.slice(0,-1)){var h=document.getElementById(u),p=h.style.top?"top":"bottom",m=+parseInt(h.style[p])+5+h.getBoundingClientRect().height;h.style[p]=m+"px"}}catch(e){console.warn("Failed to re-position notification:",e)}setTimeout(()=>{i.style.opacity=chatgpt.isDarkMode()?.8:.67,i.style.transform="translateX(0)",i.style.transition="transform 0.15s ease, opacity 0.15s ease"},10);l=a<.35?0:a-.35,t=()=>{i.style.animation="notif-zoom-fade-out 0.35s ease-out",clearTimeout(f)};let f=setTimeout(t,1e3*l);return c.onclick=t,i.onanimationend=()=>{i.remove(),(g=JSON.parse(localStorage.notifyProps)).queue[i.quadrant].shift(),localStorage.notifyProps=JSON.stringify(g)},i},obfuscate(){chatgpt.code.obfuscate()},printAllFunctions(){let o={cmdPrompt:["#ff00ff","#00ff00"],objName:["#0611e9","#f9ee16"],methodName:["#005aff","#ffa500"],entryType:["#467e06","#b981f9"],srcMethod:["#ff0000","#00ffff"]};Object.keys(o).forEach(e=>{o[e][1]=o[e][1]||"#"+(16777215^Number("0x1"+o[e][0].replace(/^#/,""))).toString(16).substring(1).toUpperCase()});var e=[];for(let t in this)if("function"==typeof this[t]){var r=!Object.keys(this).find(e=>Object.keys(this[e]).includes(this[t].name));e.push([r?"chatgpt":"other",t])}else if("object"==typeof this[t])for(var a in this[t])"function"==typeof this[t][a]&&e.push([t,a]);e.sort((e,t)=>e[0].localeCompare(t[0])||e[1].localeCompare(t[1]));var n=window.matchMedia("(prefers-color-scheme: dark)").matches,s="font-family: monospace ; font-size: larger ; ";console.log("\n%c🤖 chatgpt.js methods\n","font-family: sans-serif ; font-size: xxx-large ; font-weight: bold");for(let t of e){var i=/chatgpt|other/.test(t[0]),c="chatgpt"==t[0]?this[t[1]].name:"other"!=t[0]?t[0]+"."+t[1]:Object.keys(this).find(e=>Object.keys(this[e]).includes(this[t[1]].name))+"."+this[t[1]].name,l="AsyncFunction"==this[t[1]]?.constructor.name;console.log("%c>> %c"+(i?"":t[0]+".%c")+t[1]+" - https://chatgptjs.org/userguide/"+/(?:.*\.)?(.*)/.exec(c)[1].toLowerCase()+(l?"-async":"")+"\n%c[%c"+("chatgpt"==t[0]&&t[1]==this[t[1]].name||!i?"Function":"Alias of")+"%c: %c"+c+"%c]",s+"font-weight: bold ; color:"+o.cmdPrompt[+n],s+"font-weight: bold ;color:"+o[i?"methodName":"objName"][+n],s+"font-weight: "+(i?"initial":"bold")+";color:"+(i?"initial":o.methodName[+n]),s+"font-weight: "+(i?"bold":"initial")+";color:"+(i?o.entryType[+n]:"initial"),s+"font-weight: "+(i?"initial":"bold")+";color:"+(i?"initial":o.entryType[+n]),s+(i?"font-style: italic":"font-weight: initial")+";color:"+(i?o.srcMethod[+n]:"initial"),s+(i?"font-weight: initial":"font-style: italic")+";color:"+(i?"initial":o.srcMethod[+n]),i?"":s+"color: initial ; font-weight: initial")}},randomFloat(){return(window.crypto||window.msCrypto)?.getRandomValues(new Uint32Array(1))[0]/4294967295||Math.random()},refactor(){chatgpt.code.refactor()},regenerate(){chatgpt.response.regenerate()},renderHTML(s){var i,e=/<([a-z\d]+)\b([^>]*)>([\s\S]*?)<\/\1>/g,c=/(\S+)=['"]?((?:.(?!['"]?\s+\S+=|[>']))+.)['"]?/g,t=s.childNodes;chatgpt.renderHTML.preWrapSet||(s.style.whiteSpace="pre-wrap",chatgpt.renderHTML.preWrapSet=!0,setTimeout(()=>chatgpt.renderHTML.preWrapSet=!1,100));for(i of t)if(i.nodeType==Node.TEXT_NODE){var l=i.nodeValue,d=[...l.matchAll(e)];if(0<d.length){let e=d[0],[t,o,r,a]=e.slice(0,4),n=document.createElement(o);n.textContent=a;[...r.matchAll(c)].forEach(e=>{var t=e[1],e=e[2].replace(/['"]/g,"");n.setAttribute(t,e)});var d=chatgpt.renderHTML(n),g=document.createTextNode(l.substring(0,e.index)),l=document.createTextNode(l.substring(e.index+t.length));s.replaceChild(g,i),s.insertBefore(d,g.nextSibling),s.insertBefore(l,d.nextSibling)}}else i.nodeType==Node.ELEMENT_NODE&&chatgpt.renderHTML(i);return s},async resend(){chatgpt.send(await chatgpt.getChatData("latest","msg","user","latest"))},response:{continue(){try{chatgpt.getContinueBtn().click()}catch(e){console.error(e.message)}},get(){return this["getFrom"+(location.href.startsWith("https://chatgpt.com/c/")?"DOM":"API")].apply(null,arguments)},getFromAPI(e,t){return e=e||"latest",t=t||"latest",chatgpt.getChatData(e,"msg","chatgpt",t)},getFromDOM(e){var t=document.querySelectorAll("div[data-message-author-role=assistant]"),o=e.toString().toLowerCase();let r="";return t.length?r=(r=(/last|final/.test(o)?t[t.length-1]:t[(Number.isInteger(e)?e:/^\d+/.test(o)?/^\d+/.exec(o)[0]:(/^(?:1|one|fir)(?:st)?$/.test(o)?1:/^(?:2|tw(?:o|en|el(?:ve|f))|seco)(?:nd|t[yi])?(?:e?th)?$/.test(o)?2:/^(?:3|th(?:ree|ir?))(?:rd|teen|t[yi])?(?:e?th)?$/.test(o)?3:/^(?:4|fou?r)(?:teen|t[yi])?(?:e?th)?$/.test(o)?4:/^(?:5|fi(?:ve|f))(?:teen|t[yi])?(?:e?th)?$/.test(o)?5:/^(?:6|six)(?:teen|t[yi])?(?:e?th)?$/.test(o)?6:/^(?:7|seven)(?:teen|t[yi])?(?:e?th)?$/.test(o)?7:/^(?:8|eight?)(?:teen|t[yi])?(?:e?th)?$/.test(o)?8:/^(?:9|nine?)(?:teen|t[yi])?(?:e?th)?$/.test(o)?9:/^(?:10|ten)(?:th)?$/.test(o)?10:1)*(/(?:ty|ieth)$/.test(o)?10:1)+(/teen(?:th)?$/.test(o)?10:0))-1]).textContent).replace(/^ChatGPT(?:ChatGPT)?/,""):console.error("No conversation found!")},getLast(){return chatgpt.getChatData("active","msg","chatgpt","latest")},regenerate(){try{chatgpt.getRegenerateBtn().click()}catch(e){console.error(e.message)}},stopGenerating(){try{chatgpt.getStopBtn().click()}catch(e){console.error(e.message)}}},reviewCode(){chatgpt.code.review()},scrollToBottom(){try{chatgpt.getScrollBtn().click()}catch(e){console.error(e.message)}},send(e,o=""){for(let e=0;e<arguments.length;e++)if("string"!=typeof arguments[e])return console.error(`Argument ${e+1} must be a string!`);let r=chatgpt.getChatBox();if(!r)return console.error("Chatbar element not found!");var t=document.createElement("p");t.textContent=e,r.querySelector("p").replaceWith(t),r.dispatchEvent(new Event("input",{bubbles:!0})),setTimeout(function e(){var t=chatgpt.getSendButton();t?.hasAttribute("disabled")?setTimeout(e,222):"click"==o.toLowerCase()||chatgpt.browser.isMobile()?t.click():r.dispatchEvent(new KeyboardEvent("keydown",{key:"Enter",bubbles:!0}))},222)},sendInNewChat(e){if("string"!=typeof e)return console.error("Message must be a string!");try{chatgpt.getNewChatBtn().click()}catch(e){return console.error(e.message)}setTimeout(()=>chatgpt.send(e),500)},settings:{scheme:{isDark(){return document.documentElement.classList.contains("dark")},isLight(){return document.documentElement.classList.contains("light")},set(e){var t=["dark","light","system"];if(!e)return console.error("Please specify a scheme value!");if(!t.includes(e))return console.error(`Invalid scheme value. Valid values are [${t}]`);let o=e;"system"==e&&(o=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),localStorage.setItem("theme",e),console.info(`Scheme set to ${e.toUpperCase()}.`),document.documentElement.classList.contains(o)||this.toggle()},toggle(){var[e,t]=this.isDark()?["dark","light"]:["light","dark"];document.documentElement.classList.replace(e,t),document.documentElement.style.colorScheme=t,localStorage.setItem("theme",t)}}},async sentiment(e,t){for(let e=0;e<arguments.length;e++)if("string"!=typeof arguments[e])return console.error(`Argument ${e+1} must be a string.`);return chatgpt.send("What is the sentiment of the following text"+(t?` towards the entity ${t},`:"")+" from strongly negative to strongly positive?\n\n"+e),console.info("Analyzing sentiment..."),await chatgpt.isIdle(),chatgpt.getChatData("active","msg","chatgpt","latest")},setScheme(e){chatgpt.settings.scheme.set(e)},shareChat(s,i="clipboard"){var e=["alert","notify","notification","clipboard","copy"];if(!e.includes(i))return console.error(`Invalid method '${i}' passed. Valid methods are [${e}].`);return new Promise(o=>{chatgpt.getAccessToken().then(t=>{var a;a=t,new Promise((t,o)=>{let r=new XMLHttpRequest;chatgpt.getChatData(s).then(e=>{r.open("GET",chatgpt.endpoints.openAI.chat+"/"+e.id,!0),r.setRequestHeader("Content-Type","application/json"),r.setRequestHeader("Authorization","Bearer "+a),r.onload=()=>200!=r.status?o("🤖 chatgpt.js >> Request failed. Cannot retrieve chat node."):t(JSON.parse(r.responseText).current_node),r.send()})}).then(e=>{var a,n;a=t,n=e,new Promise((t,o)=>{let r=new XMLHttpRequest;chatgpt.getChatData(s).then(e=>{r.open("POST",chatgpt.endpoints.openAI.share_create,!0),r.setRequestHeader("Content-Type","application/json"),r.setRequestHeader("Authorization","Bearer "+a),r.onload=()=>200!=r.status?o("🤖 chatgpt.js >> Request failed. Cannot initialize share chat."):t(JSON.parse(r.responseText)),r.send(JSON.stringify({current_node_id:n,conversation_id:e.id,is_anonymous:!0}))})}).then(e=>{var r,a;r=t,a=e,new Promise((e,t)=>{let o=new XMLHttpRequest;o.open("PATCH",chatgpt.endpoints.openAI.share+"/"+a.share_id,!0),o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Authorization","Bearer "+r),o.onload=()=>200!=o.status?t("🤖 chatgpt.js >> Request failed. Cannot share chat."):(console.info(`Chat shared at '${a.share_url}'`),e()),o.send(JSON.stringify({share_id:a.share_id,highlighted_message_id:a.highlighted_message_id,title:a.title,is_public:!0,is_visible:a.is_visible,is_anonymous:a.is_anonymous}))}).then(()=>{["copy","clipboard"].includes(i)?navigator.clipboard.writeText(e.share_url):chatgpt.alert("🚀 Share link created!",`"${e.title}" is available at: <a target="blank" rel="noopener" href="${e.share_url}">${e.share_url}</a>`,[function(){window.open(e.share_url,"_blank","noopener")},function(){navigator.clipboard.writeText(e.share_url)}]),o(e.share_url)})})})})})},showFooter(){chatgpt.footer.show()},showHeader(){chatgpt.header.show()},sidebar:{elems:[],observer:{},activateObserver(){if(this.observer instanceof MutationObserver&&this.observer.disconnect(),!this.elems.length)return console.error("🤖 chatgpt.js >> No elems to append!");let t;for(var e of document.querySelectorAll(chatgpt.selectors.links.sidebarItem))if(/.*chat/.exec(e.text)[0]){t=e.classList,e.parentNode.style.margin="2px 0";break}this.elems.forEach(e=>{e.setAttribute("class",t),e.style.maxHeight=e.style.minHeight="44px",e.style.margin="2px 0"});let o=document.querySelector(chatgpt.selectors.chatHistory);if(!o)return console.error("Sidebar element not found!");this.observer=new MutationObserver(e=>e.forEach(e=>{("childList"==e.type&&e.addedNodes.length||"attributes"==e.type&&"data-chatgptjs"==e.attributeName)&&this.elems.forEach(e=>{if(!o.contains(e))try{o.querySelector("a").parentNode.before(e)}catch(e){console.error(e)}})})),this.observer.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0})},append(e,t={}){var o=["button","dropdown"];if(!e||"string"!=typeof e)return console.error("🤖 chatgpt.js >> Please supply a valid string element name!");if(e=e.toLowerCase(),!o.includes(e))return console.error(`🤖 chatgpt.js >> Invalid element! Valid elems are [${o}]`);let r=document.createElement("dropdown"==e?"select":e);if(r.id=Math.floor(1e6*chatgpt.randomFloat())+Date.now(),"button"==e){r.textContent=t?.label&&"string"==typeof t.label?t.label:"chatgpt.js button";o=document.createElement("img");o.src=t?.icon&&"string"==typeof t.icon?t.icon:chatgpt.endpoints.assets+"/starters/chrome/extension/icons/icon128.png",o.width=18,r.firstChild.before(o),r.onclick=t?.onclick&&"function"==typeof t.onclick?t.onclick:function(){}}else if("dropdown"==e){if(t?.items&&Array.isArray(t.items)&&t.items.length||(t.items=[{text:"🤖 chatgpt.js option",value:"chatgpt.js option value"}]),!t.items.every(e=>"object"==typeof e))return console.error("'items' must be an array of objects!");t.items.forEach(e=>{var t=document.createElement("option");t.textContent=e?.text,t.value=e?.value,r.add(t)})}return"dropdown"==e&&(r.style.backgroundColor="var(--gray-900, rgb(32,33,35))"),this.elems.push(r),this.activateObserver(),document.body.setAttribute("data-chatgptjs","observer-trigger"),r.id},exists(){return!!chatgpt.getNewChatLink()},hide(){this.isOn()?this.toggle():console.info("Sidebar already hidden!")},show(){this.isOff()?this.toggle():console.info("Sidebar already shown!")},isOff(){return!this.isOn()},isOn(){var e=chatgpt.sidebar.exists()?document.querySelector(chatgpt.selectors.sidebar):null;return e?chatgpt.browser.isMobile()?"hidden"==document.documentElement.style.overflow:"hidden"!=e.style.visibility&&"0px"!=e.style.width:console.error("Sidebar element not found!")||!1},toggle(){var e=document.querySelector(chatgpt.selectors.btns.sidebar);e||console.error("Sidebar toggle not found!"),e.click()},async isLoaded(t=5e3){await chatgpt.isLoaded();var e=new Promise(e=>setTimeout(()=>e(!1),t)),o=new Promise(o=>{chatgpt.getNewChatLink()?o(!0):new MutationObserver((e,t)=>{chatgpt.getNewChatLink()&&(t.disconnect(),o(!0))}).observe(document.documentElement,{childList:!0,subtree:!0})});return Promise.race([o,e])}},startNewChat(){try{chatgpt.getNewChatBtn().click()}catch(e){console.error(e.message)}},stop(){chatgpt.response.stopGenerating()},async suggest(e,t){if(!e)return console.error("ideaType (1st argument) not supplied(e.g. 'gifts', 'names', 'recipes', etc.)");for(let e=0;e<arguments.length;e++)if("string"!=typeof arguments[e])return console.error(`Argument ${e+1} must be a string.`);return chatgpt.send("Suggest some names. "+(t||"")),console.info(`Creating ${e}...`),await chatgpt.isIdle(),chatgpt.getChatData("active","msg","chatgpt","latest")},speak(e,{voice:t=2,pitch:o=2,speed:r=1.1,onend:a}={}){if("string"!=typeof e)return console.error("Message must be a string!");var n,s=["voice","pitch","speed","onend"];for(n in arguments[1]){if(!s.includes(n))return console.error(`Invalid option '${n}'. Valid keys are: `+s);var i=arguments[1][n];if("onend"!=n&&"number"!=typeof i&&!/^\d+$/.test(i))return console.error(`Invalid ${n} value '${i}'. Must be a number!`);if("onend"==n&&"function"!=typeof i)return console.error(`Invalid ${n} value. Must be a function!`)}try{var c=new SpeechSynthesisUtterance,l=speechSynthesis.getVoices();Object.assign(c,{text:e,voice:l[t],pitch:o,speed:r,onend:a}),speechSynthesis.speak(c)}catch(e){console.error(e)}},async summarize(e){return e?"string"!=typeof e?console.error("Text argument must be a string!"):(chatgpt.send("Summarize the following text:\n\n"+e),console.info("Summarizing text..."),await chatgpt.isIdle(),chatgpt.getChatData("active","msg","chatgpt","latest")):console.error("Text (1st) argument not supplied. Pass some text!")},toggleScheme(){chatgpt.settings.scheme.toggle()},async translate(e,t){if(!e)return console.error("Text (1st) argument not supplied. Pass some text!");if(!t)return console.error("outputLang (2nd) argument not supplied. Pass a language!");for(let e=0;e<arguments.length;e++)if("string"!=typeof arguments[e])return console.error(`Argument ${e+1} must be a string!`);return chatgpt.send(`Translate the following text to ${t}. Only reply with the translation.
|
|
99
|
+
div.chatgpt-notif > div.notif-close-btn { top: 18px ; right: 7px ; transform: scale(2) }`),JSON.parse(localStorage.notifyProps));g.queue[i.quadrant].push(i.id),localStorage.notifyProps=JSON.stringify(g),i.style.top=i.isTop?23..toString()+"px":"",i.style.bottom=i.isTop?"":23..toString()+"px",i.style.right=i.isRight?27..toString()+"px":"",i.style.left=i.isRight?"":27..toString()+"px";e=g.queue[i.quadrant];if(1<e.length)try{for(var u of e.slice(0,-1)){var h=document.getElementById(u),p=h.style.top?"top":"bottom",m=+parseInt(h.style[p])+5+h.getBoundingClientRect().height;h.style[p]=m+"px"}}catch(e){console.warn("Failed to re-position notification:",e)}setTimeout(()=>{i.style.opacity=chatgpt.isDarkMode()?.8:.67,i.style.transform="translateX(0)",i.style.transition="transform 0.15s ease, opacity 0.15s ease"},10);l=a<.35?0:a-.35,t=()=>{i.style.animation="notif-zoom-fade-out 0.35s ease-out",clearTimeout(f)};let f=setTimeout(t,1e3*l);return c.onclick=t,i.onanimationend=()=>{i.remove(),(g=JSON.parse(localStorage.notifyProps)).queue[i.quadrant].shift(),localStorage.notifyProps=JSON.stringify(g)},i},obfuscate(){chatgpt.code.obfuscate()},printAllFunctions(){let o={cmdPrompt:["#ff00ff","#00ff00"],objName:["#0611e9","#f9ee16"],methodName:["#005aff","#ffa500"],entryType:["#467e06","#b981f9"],srcMethod:["#ff0000","#00ffff"]};Object.keys(o).forEach(e=>{o[e][1]=o[e][1]||"#"+(16777215^Number("0x1"+o[e][0].replace(/^#/,""))).toString(16).substring(1).toUpperCase()});var e=[];for(let t in this)if("function"==typeof this[t]){var r=!Object.keys(this).find(e=>Object.keys(this[e]).includes(this[t].name));e.push([r?"chatgpt":"other",t])}else if("object"==typeof this[t])for(var a in this[t])"function"==typeof this[t][a]&&e.push([t,a]);e.sort((e,t)=>e[0].localeCompare(t[0])||e[1].localeCompare(t[1]));var n=window.matchMedia("(prefers-color-scheme: dark)").matches,s="font-family: monospace ; font-size: larger ; ";console.log("\n%c🤖 chatgpt.js methods\n","font-family: sans-serif ; font-size: xxx-large ; font-weight: bold");for(let t of e){var i=/chatgpt|other/.test(t[0]),c="chatgpt"==t[0]?this[t[1]].name:"other"!=t[0]?t[0]+"."+t[1]:Object.keys(this).find(e=>Object.keys(this[e]).includes(this[t[1]].name))+"."+this[t[1]].name,l="AsyncFunction"==this[t[1]]?.constructor.name;console.log("%c>> %c"+(i?"":t[0]+".%c")+t[1]+" - https://chatgptjs.org/userguide/"+/(?:.*\.)?(.*)/.exec(c)[1].toLowerCase()+(l?"-async":"")+"\n%c[%c"+("chatgpt"==t[0]&&t[1]==this[t[1]].name||!i?"Function":"Alias of")+"%c: %c"+c+"%c]",s+"font-weight: bold ; color:"+o.cmdPrompt[+n],s+"font-weight: bold ;color:"+o[i?"methodName":"objName"][+n],s+"font-weight: "+(i?"initial":"bold")+";color:"+(i?"initial":o.methodName[+n]),s+"font-weight: "+(i?"bold":"initial")+";color:"+(i?o.entryType[+n]:"initial"),s+"font-weight: "+(i?"initial":"bold")+";color:"+(i?"initial":o.entryType[+n]),s+(i?"font-style: italic":"font-weight: initial")+";color:"+(i?o.srcMethod[+n]:"initial"),s+(i?"font-weight: initial":"font-style: italic")+";color:"+(i?"initial":o.srcMethod[+n]),i?"":s+"color: initial ; font-weight: initial")}},randomFloat(){return(window.crypto||window.msCrypto)?.getRandomValues(new Uint32Array(1))[0]/4294967295||Math.random()},refactor(){chatgpt.code.refactor()},regenerate(){chatgpt.response.regenerate()},renderHTML(s){var i,e=/<([a-z\d]+)\b([^>]*)>([\s\S]*?)<\/\1>/g,c=/(\S+)=['"]?((?:.(?!['"]?\s+\S+=|[>']))+.)['"]?/g,t=s.childNodes;chatgpt.renderHTML.preWrapSet||(s.style.whiteSpace="pre-wrap",chatgpt.renderHTML.preWrapSet=!0,setTimeout(()=>chatgpt.renderHTML.preWrapSet=!1,100));for(i of t)if(i.nodeType==Node.TEXT_NODE){var l=i.nodeValue,d=[...l.matchAll(e)];if(0<d.length){let e=d[0],[t,o,r,a]=e.slice(0,4),n=document.createElement(o);n.textContent=a;[...r.matchAll(c)].forEach(e=>{var t=e[1],e=e[2].replace(/['"]/g,"");n.setAttribute(t,e)});var d=chatgpt.renderHTML(n),g=document.createTextNode(l.substring(0,e.index)),l=document.createTextNode(l.substring(e.index+t.length));s.replaceChild(g,i),s.insertBefore(d,g.nextSibling),s.insertBefore(l,d.nextSibling)}}else i.nodeType==Node.ELEMENT_NODE&&chatgpt.renderHTML(i);return s},async resend(){chatgpt.send(await chatgpt.getChatData("latest","msg","user","latest"))},response:{continue(){try{chatgpt.getContinueBtn().click()}catch(e){console.error(e.message)}},get(){return this["getFrom"+(location.href.startsWith("https://chatgpt.com/c/")?"DOM":"API")].apply(null,arguments)},getFromAPI(e,t){return e=e||"latest",t=t||"latest",chatgpt.getChatData(e,"msg","chatgpt",t)},getFromDOM(e){var t=document.querySelectorAll("div[data-message-author-role=assistant]"),o=e.toString().toLowerCase();let r="";return t.length?r=(r=(/last|final/.test(o)?t[t.length-1]:t[(Number.isInteger(e)?e:/^\d+/.test(o)?/^\d+/.exec(o)[0]:(/^(?:1|one|fir)(?:st)?$/.test(o)?1:/^(?:2|tw(?:o|en|el(?:ve|f))|seco)(?:nd|t[yi])?(?:e?th)?$/.test(o)?2:/^(?:3|th(?:ree|ir?))(?:rd|teen|t[yi])?(?:e?th)?$/.test(o)?3:/^(?:4|fou?r)(?:teen|t[yi])?(?:e?th)?$/.test(o)?4:/^(?:5|fi(?:ve|f))(?:teen|t[yi])?(?:e?th)?$/.test(o)?5:/^(?:6|six)(?:teen|t[yi])?(?:e?th)?$/.test(o)?6:/^(?:7|seven)(?:teen|t[yi])?(?:e?th)?$/.test(o)?7:/^(?:8|eight?)(?:teen|t[yi])?(?:e?th)?$/.test(o)?8:/^(?:9|nine?)(?:teen|t[yi])?(?:e?th)?$/.test(o)?9:/^(?:10|ten)(?:th)?$/.test(o)?10:1)*(/(?:ty|ieth)$/.test(o)?10:1)+(/teen(?:th)?$/.test(o)?10:0))-1]).textContent).replace(/^ChatGPT(?:ChatGPT)?/,""):console.error("No conversation found!")},getLast(){return chatgpt.getChatData("active","msg","chatgpt","latest")},regenerate(){try{chatgpt.getRegenerateBtn().click()}catch(e){console.error(e.message)}},stopGenerating(){try{chatgpt.getStopBtn().click()}catch(e){console.error(e.message)}}},reviewCode(){chatgpt.code.review()},scrollToBottom(){try{chatgpt.getScrollBtn().click()}catch(e){console.error(e.message)}},send(e,o=""){for(let e=0;e<arguments.length;e++)if("string"!=typeof arguments[e])return console.error(`Argument ${e+1} must be a string!`);let r=chatgpt.getChatBox();if(!r)return console.error("Chatbar element not found!");var t=document.createElement("p");t.textContent=e,r.querySelector("p").replaceWith(t),r.dispatchEvent(new Event("input",{bubbles:!0})),setTimeout(function e(){var t=chatgpt.getSendButton();t?.hasAttribute("disabled")?setTimeout(e,222):"click"==o.toLowerCase()||chatgpt.browser.isMobile()?t.click():r.dispatchEvent(new KeyboardEvent("keydown",{key:"Enter",bubbles:!0}))},222)},sendInNewChat(e){if("string"!=typeof e)return console.error("Message must be a string!");try{chatgpt.getNewChatBtn().click()}catch(e){return console.error(e.message)}setTimeout(()=>chatgpt.send(e),500)},settings:{scheme:{isDark(){return document.documentElement.classList.contains("dark")},isLight(){return document.documentElement.classList.contains("light")},set(e){var t=["dark","light","system"];if(!e)return console.error("Please specify a scheme value!");if(!t.includes(e))return console.error(`Invalid scheme value. Valid values are [${t}]`);let o=e;"system"==e&&(o=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),localStorage.setItem("theme",e),console.info(`Scheme set to ${e.toUpperCase()}.`),document.documentElement.classList.contains(o)||this.toggle()},toggle(){var[e,t]=this.isDark()?["dark","light"]:["light","dark"];document.documentElement.classList.replace(e,t),document.documentElement.style.colorScheme=t,localStorage.setItem("theme",t)}}},async sentiment(e,t){for(let e=0;e<arguments.length;e++)if("string"!=typeof arguments[e])return console.error(`Argument ${e+1} must be a string.`);return chatgpt.send("What is the sentiment of the following text"+(t?` towards the entity ${t},`:"")+" from strongly negative to strongly positive?\n\n"+e),console.info("Analyzing sentiment..."),await chatgpt.isIdle(),chatgpt.getChatData("active","msg","chatgpt","latest")},setScheme(e){chatgpt.settings.scheme.set(e)},shareChat(s,i="clipboard"){var e=["alert","notify","notification","clipboard","copy"];if(!e.includes(i))return console.error(`Invalid method '${i}' passed. Valid methods are [${e}].`);return new Promise(o=>{chatgpt.getAccessToken().then(t=>{var a;a=t,new Promise((t,o)=>{let r=new XMLHttpRequest;chatgpt.getChatData(s).then(e=>{r.open("GET",chatgpt.endpoints.openAI.chat+"/"+e.id,!0),r.setRequestHeader("Content-Type","application/json"),r.setRequestHeader("Authorization","Bearer "+a),r.onload=()=>200!=r.status?o("🤖 chatgpt.js >> Request failed. Cannot retrieve chat node."):t(JSON.parse(r.responseText).current_node),r.send()})}).then(e=>{var a,n;a=t,n=e,new Promise((t,o)=>{let r=new XMLHttpRequest;chatgpt.getChatData(s).then(e=>{r.open("POST",chatgpt.endpoints.openAI.share_create,!0),r.setRequestHeader("Content-Type","application/json"),r.setRequestHeader("Authorization","Bearer "+a),r.onload=()=>200!=r.status?o("🤖 chatgpt.js >> Request failed. Cannot initialize share chat."):t(JSON.parse(r.responseText)),r.send(JSON.stringify({current_node_id:n,conversation_id:e.id,is_anonymous:!0}))})}).then(e=>{var r,a;r=t,a=e,new Promise((e,t)=>{let o=new XMLHttpRequest;o.open("PATCH",chatgpt.endpoints.openAI.share+"/"+a.share_id,!0),o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Authorization","Bearer "+r),o.onload=()=>200!=o.status?t("🤖 chatgpt.js >> Request failed. Cannot share chat."):(console.info(`Chat shared at '${a.share_url}'`),e()),o.send(JSON.stringify({share_id:a.share_id,highlighted_message_id:a.highlighted_message_id,title:a.title,is_public:!0,is_visible:a.is_visible,is_anonymous:a.is_anonymous}))}).then(()=>{["copy","clipboard"].includes(i)?navigator.clipboard.writeText(e.share_url):chatgpt.alert("🚀 Share link created!",`"${e.title}" is available at: <a target="blank" rel="noopener" href="${e.share_url}">${e.share_url}</a>`,[function(){window.open(e.share_url,"_blank","noopener")},function(){navigator.clipboard.writeText(e.share_url)}]),o(e.share_url)})})})})})},showFooter(){chatgpt.footer.show()},showHeader(){chatgpt.header.show()},sidebar:{elems:[],observer:{},activateObserver(){if(this.observer instanceof MutationObserver&&this.observer.disconnect(),!this.elems.length)return console.error("🤖 chatgpt.js >> No elems to append!");let t;for(var e of document.querySelectorAll(chatgpt.selectors.links.sidebarItem))if(/.*chat/.exec(e.text)[0]){t=e.classList,e.parentNode.style.margin="2px 0";break}this.elems.forEach(e=>{e.setAttribute("class",t),e.style.maxHeight=e.style.minHeight="44px",e.style.margin="2px 0"});let o=document.querySelector(chatgpt.selectors.chatHistory);if(!o)return console.error("Sidebar element not found!");this.observer=new MutationObserver(e=>e.forEach(e=>{("childList"==e.type&&e.addedNodes.length||"attributes"==e.type&&"data-chatgptjs"==e.attributeName)&&this.elems.forEach(e=>{if(!o.contains(e))try{o.querySelector("a").parentNode.before(e)}catch(e){console.error(e)}})})),this.observer.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0})},append(e,t={}){var o=["button","dropdown"];if(!e||"string"!=typeof e)return console.error("🤖 chatgpt.js >> Please supply a valid string element name!");if(e=e.toLowerCase(),!o.includes(e))return console.error(`🤖 chatgpt.js >> Invalid element! Valid elems are [${o}]`);let r=document.createElement("dropdown"==e?"select":e);if(r.id=Math.floor(1e6*chatgpt.randomFloat())+Date.now(),"button"==e){r.textContent=t?.label&&"string"==typeof t.label?t.label:"chatgpt.js button";o=document.createElement("img");o.src=t?.icon&&"string"==typeof t.icon?t.icon:chatgpt.endpoints.assets+"/starters/chrome/extension/icons/icon128.png",o.width=18,r.firstChild.before(o),r.onclick=t?.onclick&&"function"==typeof t.onclick?t.onclick:function(){}}else if("dropdown"==e){if(t?.items&&Array.isArray(t.items)&&t.items.length||(t.items=[{text:"🤖 chatgpt.js option",value:"chatgpt.js option value"}]),!t.items.every(e=>"object"==typeof e))return console.error("'items' must be an array of objects!");t.items.forEach(e=>{var t=document.createElement("option");t.textContent=e?.text,t.value=e?.value,r.add(t)})}return"dropdown"==e&&(r.style.backgroundColor="var(--gray-900, rgb(32,33,35))"),this.elems.push(r),this.activateObserver(),document.body.setAttribute("data-chatgptjs","observer-trigger"),r.id},exists(){return!!chatgpt.getNewChatLink()},hide(){this.isOn()?this.toggle():console.info("Sidebar already hidden!")},show(){this.isOff()?this.toggle():console.info("Sidebar already shown!")},isOff(){return!this.isOn()},isOn(){var e=chatgpt.sidebar.exists()?document.querySelector(chatgpt.selectors.sidebar):null;return e?chatgpt.browser.isMobile()?"hidden"==document.documentElement.style.overflow:"hidden"!=e.style.visibility&&150<parseInt(getComputedStyle(e).width):console.error("Sidebar element not found!")||!1},toggle(){var e=document.querySelector(chatgpt.selectors.btns.sidebar);e||console.error("Sidebar toggle not found!"),e.click()},async isLoaded(t=5e3){await chatgpt.isLoaded();var e=new Promise(e=>setTimeout(()=>e(!1),t)),o=new Promise(o=>{chatgpt.getNewChatLink()?o(!0):new MutationObserver((e,t)=>{chatgpt.getNewChatLink()&&(t.disconnect(),o(!0))}).observe(document.documentElement,{childList:!0,subtree:!0})});return Promise.race([o,e])}},startNewChat(){try{chatgpt.getNewChatBtn().click()}catch(e){console.error(e.message)}},stop(){chatgpt.response.stopGenerating()},async suggest(e,t){if(!e)return console.error("ideaType (1st argument) not supplied(e.g. 'gifts', 'names', 'recipes', etc.)");for(let e=0;e<arguments.length;e++)if("string"!=typeof arguments[e])return console.error(`Argument ${e+1} must be a string.`);return chatgpt.send("Suggest some names. "+(t||"")),console.info(`Creating ${e}...`),await chatgpt.isIdle(),chatgpt.getChatData("active","msg","chatgpt","latest")},speak(e,{voice:t=2,pitch:o=2,speed:r=1.1,onend:a}={}){if("string"!=typeof e)return console.error("Message must be a string!");var n,s=["voice","pitch","speed","onend"];for(n in arguments[1]){if(!s.includes(n))return console.error(`Invalid option '${n}'. Valid keys are: `+s);var i=arguments[1][n];if("onend"!=n&&"number"!=typeof i&&!/^\d+$/.test(i))return console.error(`Invalid ${n} value '${i}'. Must be a number!`);if("onend"==n&&"function"!=typeof i)return console.error(`Invalid ${n} value. Must be a function!`)}try{var c=new SpeechSynthesisUtterance,l=speechSynthesis.getVoices();Object.assign(c,{text:e,voice:l[t],pitch:o,speed:r,onend:a}),speechSynthesis.speak(c)}catch(e){console.error(e)}},async summarize(e){return e?"string"!=typeof e?console.error("Text argument must be a string!"):(chatgpt.send("Summarize the following text:\n\n"+e),console.info("Summarizing text..."),await chatgpt.isIdle(),chatgpt.getChatData("active","msg","chatgpt","latest")):console.error("Text (1st) argument not supplied. Pass some text!")},toggleScheme(){chatgpt.settings.scheme.toggle()},async translate(e,t){if(!e)return console.error("Text (1st) argument not supplied. Pass some text!");if(!t)return console.error("outputLang (2nd) argument not supplied. Pass a language!");for(let e=0;e<arguments.length;e++)if("string"!=typeof arguments[e])return console.error(`Argument ${e+1} must be a string!`);return chatgpt.send(`Translate the following text to ${t}. Only reply with the translation.
|
|
100
100
|
|
|
101
101
|
`+e),console.info("Translating text..."),await chatgpt.isIdle(),chatgpt.getChatData("active","msg","chatgpt","latest")},unminify(){chatgpt.code.unminify()},uuidv4(){try{return crypto.randomUUID()}catch(e){let o=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{var t=(o+window.crypto.getRandomValues(new Uint32Array(1))[0]/(Math.pow(2,32)-1)*16)%16|0;return o=Math.floor(o/16),("x"==e?t:3&t|8).toString(16)})}},writeCode(){chatgpt.code.write()}},cjsBtnActions=(chatgpt.scheme={...chatgpt.settings.scheme},["click","get"]),cjsTargetTypes=["button","link","div","response"];for(let t of cjsBtnActions)chatgpt[t+"Button"]=function(o){var e=/^[.#]/.test(o)?document.querySelector(o):/send/i.test(o)?document.querySelector(chatgpt.selectors.btns.send):/scroll/i.test(o)?document.querySelector(chatgpt.selectors.btns.scroll):(()=>{for(var e of document.querySelectorAll("button"))if(e.textContent.toLowerCase().includes(o.toLowerCase()))return e;for(var t of document.querySelectorAll(chatgpt.selectors.links.sidebarItem))if(t.textContent.toLowerCase().includes(o.toLowerCase()))return t})();if("click"!=t)return e;e.click()};let cjsFuncAliases=[["actAs","act","become","persona","premadePrompt","preMadePrompt","prePrompt","rolePlay","rp"],["activateAutoRefresh","activateAutoRefresher","activateRefresher","activateSessionRefresher","autoRefresh","autoRefresher","autoRefreshSession","refresher","sessionRefresher"],["continue","continueChat","continueGenerating","continueResponse"],["deactivateAutoRefresh","deactivateAutoRefresher","deactivateRefresher","deactivateSessionRefresher"],["detectLanguage","getLanguage"],["executeCode","codeExecute"],["exists","isAvailable","isExistent","isPresent"],["exportChat","chatExport","export"],["getFooterDiv","getFooter"],["getHeaderDiv","getHeader"],["getLastPrompt","getLastQuery","getMyLastMessage","getMyLastQuery"],["getContinueButton","getContinueGeneratingButton"],["getScrollToBottomButton","getScrollButton"],["getStopButton","getStopGeneratingButton"],["getTextarea","getTextArea","getChatbar","getChatBar","getChatbox","getChatBox"],["getVoiceButton","getVoiceModeButton"],["isFullScreen","isFullscreen"],["isTempChat","isIncognito","isIncognitoMode","isTempChatMode"],["minify","codeMinify","minifyCode"],["new","newChat","startNewChat"],["obfuscate","codeObfuscate","obfuscateCode"],["printAllFunctions","showAllFunctions"],["refactor","codeRefactor","refactorCode"],["refreshReply","regenerate","regenerateReply"],["refreshSession","sessionRefresh"],["renderHTML","renderHtml","renderLinks","renderTags"],["reviewCode","codeReview"],["send","sendChat","sendMessage"],["sendInNewChat","sendNewChat"],["sentiment","analyzeSentiment","sentimentAnalysis"],["startNewChat","new","newChat"],["stop","stopChat","stopGenerating","stopResponse"],["suggest","suggestion","recommend"],["toggleAutoRefresh","toggleAutoRefresher","toggleRefresher","toggleSessionRefresher"],["toggleScheme","toggleMode"],["translate","translation","translator"],["unminify","unminifyCode","codeUnminify"],["writeCode","codeWrite"]],cjsFuncSynonyms=[["account","acct"],["activate","turnOn"],["analyze","check","evaluate","review"],["ask","send","submit"],["button","btn"],["continue","resume"],["chats","history"],["chat","conversation","convo"],["clear","delete","remove"],["data","details"],["deactivate","deActivate","turnOff"],["execute","interpret","interpreter","run"],["firefox","ff"],["generating","generation"],["login","logIn","logOn","signIn","signOn"],["logout","logOut","logOff","signOff","signOut"],["message","msg"],["minify","uglify"],["refactor","rewrite"],["regenerate","regen"],["render","parse"],["reply","response"],["sentiment","attitude","emotion","feeling","opinion","perception"],["speak","play","say","speech","talk","tts"],["summarize","tldr"],["temp","temporary"],["typing","generating"],["unminify","beautify","prettify","prettyPrint"]];function toCamelCase(e){return e.map((e,t)=>0==t?e:e[0].toUpperCase()+e.slice(1)).join("")}!function e(n=chatgpt){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&"object"==typeof n[t]&&e(n[t]);let s;do{s=!1;for(let a in n)if(Object.prototype.hasOwnProperty.call(n,a)&&"function"==typeof n[a]){n[a.toLowerCase()]=n[a],cjsFuncAliases.forEach(e=>{e.includes(a)&&e.forEach(e=>{n[e]||(n[e]=n[e.toLowerCase()]=n[a],s=!0)})});let r=a.split(/(?=[A-Z])/);r.forEach(o=>{cjsFuncSynonyms.filter(e=>e.includes(o.toLowerCase())).flat().filter(e=>e!=o.toLowerCase()).forEach(t=>{var e=toCamelCase(r.map(e=>e==o?t:e));n[e]||(n[e]=n[e.toLowerCase()]=n[a],s=!0)})})}}while(s)}();let consolePrefix="🤖 chatgpt.js >> ",ogError=console.error,ogInfo=console.info;console.error=(...e)=>{e[0].startsWith(consolePrefix)?ogError(...e):ogError(consolePrefix+e[0],...e.slice(1))},console.info=e=>{e.startsWith(consolePrefix)?ogInfo(e):ogInfo(consolePrefix+e)};try{window.chatgpt=chatgpt}catch(e){}try{module.exports=chatgpt}catch(e){}
|
package/docs/README.md
CHANGED
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
<img src="https://img.shields.io/badge/License-MIT-fc4f2d.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
52
52
|
<a href="https://www.npmjs.com/package/@kudoai/chatgpt.js/v/latest" target="_blank" rel="noopener">
|
|
53
53
|
<img src="https://img.shields.io/npm/v/%40kudoai%2Fchatgpt.js?logo=npm&logoColor=white&labelColor=464646&color=blue&style=for-the-badge&label=Latest+Release"></a>
|
|
54
|
-
<a href="https://github.com/KudoAI/chatgpt.js/tree/v3.8.
|
|
55
|
-
<img src="https://img.shields.io/github/size/KudoAI/chatgpt.js/dist/chatgpt.min.js?branch=v3.8.
|
|
54
|
+
<a href="https://github.com/KudoAI/chatgpt.js/tree/v3.8.3/dist/chatgpt.min.js" target="_blank" rel="noopener">
|
|
55
|
+
<img src="https://img.shields.io/github/size/KudoAI/chatgpt.js/dist/chatgpt.min.js?branch=v3.8.3&label=Minified%20Size&logo=databricks&logoColor=white&labelColor=464646&color=ff69b4&style=for-the-badge"></a>
|
|
56
56
|
<a href="https://www.codefactor.io/repository/github/kudoai/chatgpt.js" target="_blank" rel="noopener">
|
|
57
57
|
<img src="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"></a>
|
|
58
58
|
<a href="https://sonarcloud.io/component_measures?metric=new_vulnerabilities&id=kudoai_chatgpt.js" target="_blank" rel="noopener">
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
|
|
121
121
|
```js
|
|
122
122
|
(async () => {
|
|
123
|
-
await import('https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.8.
|
|
123
|
+
await import('https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.8.3/dist/chatgpt.min.js');
|
|
124
124
|
// Your code here...
|
|
125
125
|
})();
|
|
126
126
|
```
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
|
|
130
130
|
```js
|
|
131
131
|
var xhr = new XMLHttpRequest();
|
|
132
|
-
xhr.open('GET', 'https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.8.
|
|
132
|
+
xhr.open('GET', 'https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.8.3/dist/chatgpt.min.js');
|
|
133
133
|
xhr.onload = function () {
|
|
134
134
|
if (xhr.status === 200) {
|
|
135
135
|
var chatgptJS = document.createElement('script');
|
|
@@ -152,7 +152,7 @@ function yourCode() {
|
|
|
152
152
|
|
|
153
153
|
```js
|
|
154
154
|
...
|
|
155
|
-
// @require https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.8.
|
|
155
|
+
// @require https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.8.3/dist/chatgpt.min.js
|
|
156
156
|
// ==/UserScript==
|
|
157
157
|
|
|
158
158
|
// Your code here...
|
|
@@ -222,7 +222,7 @@ chatgpt.get('reply', 'last');
|
|
|
222
222
|
|
|
223
223
|
Each call equally fetches the last response. If you think it works, it probably will... so just type it!
|
|
224
224
|
|
|
225
|
-
If it didn't, check out the extended [userguide](https://github.com/KudoAI/chatgpt.js/blob/v3.8.
|
|
225
|
+
If it didn't, check out the extended [userguide](https://github.com/KudoAI/chatgpt.js/blob/v3.8.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!
|
|
226
226
|
|
|
227
227
|
<img height=8px width="100%" src="https://assets.chatgptjs.org/images/separators/gradient-aqua.png?v=e638eac">
|
|
228
228
|
|
|
@@ -480,7 +480,7 @@ This library exists thanks to code, translations, issues & ideas from the follow
|
|
|
480
480
|
<div align="center">
|
|
481
481
|
|
|
482
482
|
**[Releases](https://github.com/KudoAI/chatgpt.js/releases)** /
|
|
483
|
-
[Userguide](https://github.com/KudoAI/chatgpt.js/blob/v3.8.
|
|
483
|
+
[Userguide](https://github.com/KudoAI/chatgpt.js/blob/v3.8.3/docs/USERGUIDE.md) /
|
|
484
484
|
[Discuss](https://github.com/KudoAI/chatgpt.js/discussions) /
|
|
485
485
|
[Back to top ↑](#top)
|
|
486
486
|
|
package/docs/USERGUIDE.md
CHANGED
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
|
|
166
166
|
```js
|
|
167
167
|
(async () => {
|
|
168
|
-
await import('https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.8.
|
|
168
|
+
await import('https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.8.3/dist/chatgpt.min.js');
|
|
169
169
|
// Your code here...
|
|
170
170
|
})();
|
|
171
171
|
```
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
|
|
175
175
|
```js
|
|
176
176
|
var xhr = new XMLHttpRequest();
|
|
177
|
-
xhr.open('GET', 'https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.8.
|
|
177
|
+
xhr.open('GET', 'https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.8.3/dist/chatgpt.min.js');
|
|
178
178
|
xhr.onload = function () {
|
|
179
179
|
if (xhr.status === 200) {
|
|
180
180
|
var chatgptJS = document.createElement('script');
|
|
@@ -196,7 +196,7 @@ function yourCode() {
|
|
|
196
196
|
|
|
197
197
|
```js
|
|
198
198
|
...
|
|
199
|
-
// @require https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.8.
|
|
199
|
+
// @require https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.8.3/dist/chatgpt.min.js
|
|
200
200
|
// ==/UserScript==
|
|
201
201
|
|
|
202
202
|
// Your code here...
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kudoai/chatgpt.js",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.3",
|
|
4
4
|
"description": "Client-side JavaScript library for ChatGPT",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "KudoAI & contributors",
|
|
@@ -74,16 +74,16 @@
|
|
|
74
74
|
"bugs": "https://github.com/KudoAI/chatgpt.js/issues",
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@adamlui/minify.js": "^1.8.6",
|
|
77
|
-
"@adamlui/scss-to-css": "^1.10.
|
|
77
|
+
"@adamlui/scss-to-css": "^1.10.37",
|
|
78
78
|
"@eslint/css": "^0.10.0",
|
|
79
79
|
"@eslint/json": "^0.13.1",
|
|
80
80
|
"@eslint/markdown": "^7.1.0",
|
|
81
|
-
"@html-eslint/eslint-plugin": "^0.
|
|
82
|
-
"@html-eslint/parser": "^0.
|
|
83
|
-
"@stylistic/eslint-plugin": "^5.2.
|
|
84
|
-
"eslint": "^9.
|
|
81
|
+
"@html-eslint/eslint-plugin": "^0.45.0",
|
|
82
|
+
"@html-eslint/parser": "^0.45.0",
|
|
83
|
+
"@stylistic/eslint-plugin": "^5.2.3",
|
|
84
|
+
"eslint": "^9.33.0",
|
|
85
85
|
"eslint-plugin-import": "^2.32.0",
|
|
86
|
-
"eslint-plugin-regexp": "^2.
|
|
86
|
+
"eslint-plugin-regexp": "^2.10.0",
|
|
87
87
|
"eslint-plugin-yml": "^1.18.0",
|
|
88
88
|
"get-port": "^7.1.0",
|
|
89
89
|
"husky": "^9.1.7"
|
|
@@ -1893,7 +1893,7 @@ const chatgpt = {
|
|
|
1893
1893
|
if (!sidebar) { return console.error('Sidebar element not found!') || false }
|
|
1894
1894
|
else return chatgpt.browser.isMobile() ?
|
|
1895
1895
|
document.documentElement.style.overflow == 'hidden'
|
|
1896
|
-
: sidebar.style.visibility != 'hidden' && sidebar.
|
|
1896
|
+
: sidebar.style.visibility != 'hidden' && parseInt(getComputedStyle(sidebar).width) > 150
|
|
1897
1897
|
},
|
|
1898
1898
|
|
|
1899
1899
|
toggle() {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "ChatGPT Extension",
|
|
4
4
|
"short_name": "ChatGPT 🧩",
|
|
5
5
|
"description": "A Chromium extension template to start using chatgpt.js like a boss!",
|
|
6
|
-
"version": "2025.
|
|
6
|
+
"version": "2025.8.14",
|
|
7
7
|
"author": "KudoAI",
|
|
8
8
|
"homepage_url": "https://github.com/KudoAI/chatgpt.js-chrome-starter",
|
|
9
9
|
"icons": { "16": "icons/icon16.png", "32": "icons/icon32.png", "64": "icons/icon64.png", "128": "icons/icon128.png" },
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @description A Greasemonkey template to start using chatgpt.js like a boss
|
|
4
4
|
// @author chatgpt.js
|
|
5
5
|
// @namespace https://chatgpt.js.org
|
|
6
|
-
// @version 2025.
|
|
6
|
+
// @version 2025.8.14
|
|
7
7
|
// @license MIT
|
|
8
8
|
// @icon data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='180'%20height='180'%20fill='none'%3e%3cstyle%3e%20:root%20{%20--primary-fill:%20%23000;%20--secondary-fill:%20%23fff;%20}%20@media%20(prefers-color-scheme:%20dark)%20{%20:root%20{%20--primary-fill:%20%23fff;%20--secondary-fill:%20%23000;%20}%20}%20%3c/style%3e%3cg%20clip-path='url(%23a)'%3e%3crect%20width='180'%20height='180'%20fill='var(--primary-fill)'%20rx='90'%20/%3e%3cg%20clip-path='url(%23b)'%3e%3cpath%20fill='var(--secondary-fill)'%20d='M75.91%2073.628V62.232c0-.96.36-1.68%201.199-2.16l22.912-13.194c3.119-1.8%206.838-2.639%2010.676-2.639%2014.394%200%2023.511%2011.157%2023.511%2023.032%200%20.839%200%201.799-.12%202.758l-23.752-13.914c-1.439-.84-2.879-.84-4.318%200L75.91%2073.627Zm53.499%2044.383v-27.23c0-1.68-.72-2.88-2.159-3.719L97.142%2069.55l9.836-5.638c.839-.48%201.559-.48%202.399%200l22.912%2013.195c6.598%203.839%2011.035%2011.995%2011.035%2019.912%200%209.116-5.397%2017.513-13.915%2020.992v.001Zm-60.577-23.99-9.836-5.758c-.84-.48-1.2-1.2-1.2-2.16v-26.39c0-12.834%209.837-22.55%2023.152-22.55%205.039%200%209.716%201.679%2013.676%204.678L70.993%2055.516c-1.44.84-2.16%202.039-2.16%203.719v34.787-.002Zm21.173%2012.234L75.91%2098.339V81.546l14.095-7.917%2014.094%207.917v16.793l-14.094%207.916Zm9.056%2036.467c-5.038%200-9.716-1.68-13.675-4.678l23.631-13.676c1.439-.839%202.159-2.038%202.159-3.718V85.863l9.956%205.757c.84.48%201.2%201.2%201.2%202.16v26.389c0%2012.835-9.957%2022.552-23.27%2022.552v.001Zm-28.43-26.75L47.72%20102.778c-6.599-3.84-11.036-11.996-11.036-19.913%200-9.236%205.518-17.513%2014.034-20.992v27.35c0%201.68.72%202.879%202.16%203.718l29.989%2017.393-9.837%205.638c-.84.48-1.56.48-2.399%200Zm-1.318%2019.673c-13.555%200-23.512-10.196-23.512-22.792%200-.959.12-1.919.24-2.879l23.63%2013.675c1.44.84%202.88.84%204.32%200l30.108-17.392v11.395c0%20.96-.361%201.68-1.2%202.16l-22.912%2013.194c-3.119%201.8-6.837%202.639-10.675%202.639Zm29.748%2014.274c14.515%200%2026.63-10.316%2029.39-23.991%2013.434-3.479%2022.071-16.074%2022.071-28.91%200-8.396-3.598-16.553-10.076-22.43.6-2.52.96-5.039.96-7.557%200-17.153-13.915-29.99-29.989-29.99-3.239%200-6.358.48-9.477%201.56-5.398-5.278-12.835-8.637-20.992-8.637-14.515%200-26.63%2010.316-29.39%2023.991-13.434%203.48-22.07%2016.074-22.07%2028.91%200%208.396%203.598%2016.553%2010.075%2022.431-.6%202.519-.96%205.038-.96%207.556%200%2017.154%2013.915%2029.989%2029.99%2029.989%203.238%200%206.357-.479%209.476-1.559%205.397%205.278%2012.835%208.637%2020.992%208.637Z'%20/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20d='M0%200h180v180H0z'%20/%3e%3c/clipPath%3e%3cclipPath%20id='b'%3e%3cpath%20d='M29.487%2029.964h121.035v119.954H29.487z'%20/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e
|
|
9
9
|
// @icon64 data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='180'%20height='180'%20fill='none'%3e%3cstyle%3e%20:root%20{%20--primary-fill:%20%23000;%20--secondary-fill:%20%23fff;%20}%20@media%20(prefers-color-scheme:%20dark)%20{%20:root%20{%20--primary-fill:%20%23fff;%20--secondary-fill:%20%23000;%20}%20}%20%3c/style%3e%3cg%20clip-path='url(%23a)'%3e%3crect%20width='180'%20height='180'%20fill='var(--primary-fill)'%20rx='90'%20/%3e%3cg%20clip-path='url(%23b)'%3e%3cpath%20fill='var(--secondary-fill)'%20d='M75.91%2073.628V62.232c0-.96.36-1.68%201.199-2.16l22.912-13.194c3.119-1.8%206.838-2.639%2010.676-2.639%2014.394%200%2023.511%2011.157%2023.511%2023.032%200%20.839%200%201.799-.12%202.758l-23.752-13.914c-1.439-.84-2.879-.84-4.318%200L75.91%2073.627Zm53.499%2044.383v-27.23c0-1.68-.72-2.88-2.159-3.719L97.142%2069.55l9.836-5.638c.839-.48%201.559-.48%202.399%200l22.912%2013.195c6.598%203.839%2011.035%2011.995%2011.035%2019.912%200%209.116-5.397%2017.513-13.915%2020.992v.001Zm-60.577-23.99-9.836-5.758c-.84-.48-1.2-1.2-1.2-2.16v-26.39c0-12.834%209.837-22.55%2023.152-22.55%205.039%200%209.716%201.679%2013.676%204.678L70.993%2055.516c-1.44.84-2.16%202.039-2.16%203.719v34.787-.002Zm21.173%2012.234L75.91%2098.339V81.546l14.095-7.917%2014.094%207.917v16.793l-14.094%207.916Zm9.056%2036.467c-5.038%200-9.716-1.68-13.675-4.678l23.631-13.676c1.439-.839%202.159-2.038%202.159-3.718V85.863l9.956%205.757c.84.48%201.2%201.2%201.2%202.16v26.389c0%2012.835-9.957%2022.552-23.27%2022.552v.001Zm-28.43-26.75L47.72%20102.778c-6.599-3.84-11.036-11.996-11.036-19.913%200-9.236%205.518-17.513%2014.034-20.992v27.35c0%201.68.72%202.879%202.16%203.718l29.989%2017.393-9.837%205.638c-.84.48-1.56.48-2.399%200Zm-1.318%2019.673c-13.555%200-23.512-10.196-23.512-22.792%200-.959.12-1.919.24-2.879l23.63%2013.675c1.44.84%202.88.84%204.32%200l30.108-17.392v11.395c0%20.96-.361%201.68-1.2%202.16l-22.912%2013.194c-3.119%201.8-6.837%202.639-10.675%202.639Zm29.748%2014.274c14.515%200%2026.63-10.316%2029.39-23.991%2013.434-3.479%2022.071-16.074%2022.071-28.91%200-8.396-3.598-16.553-10.076-22.43.6-2.52.96-5.039.96-7.557%200-17.153-13.915-29.99-29.989-29.99-3.239%200-6.358.48-9.477%201.56-5.398-5.278-12.835-8.637-20.992-8.637-14.515%200-26.63%2010.316-29.39%2023.991-13.434%203.48-22.07%2016.074-22.07%2028.91%200%208.396%203.598%2016.553%2010.075%2022.431-.6%202.519-.96%205.038-.96%207.556%200%2017.154%2013.915%2029.989%2029.99%2029.989%203.238%200%206.357-.479%209.476-1.559%205.397%205.278%2012.835%208.637%2020.992%208.637Z'%20/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20d='M0%200h180v180H0z'%20/%3e%3c/clipPath%3e%3cclipPath%20id='b'%3e%3cpath%20d='M29.487%2029.964h121.035v119.954H29.487z'%20/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e
|
|
10
10
|
// @match *://chatgpt.com/*
|
|
11
|
-
// @require https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.8.
|
|
11
|
+
// @require https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.8.3/dist/chatgpt.min.js
|
|
12
12
|
// @grant GM_getValue
|
|
13
13
|
// @grant GM_setValue
|
|
14
14
|
// @noframes
|