Skip to content

Commit

Permalink
Bumped chatgpt.js to 3.3.2 ↞ [auto-sync from `adamlui/chatgpt-apps/ch…
Browse files Browse the repository at this point in the history
…atgpt-widescreen/chrome`]
  • Loading branch information
adamlui authored and kudo-sync-bot committed Sep 25, 2024
1 parent dc69598 commit 07ac303
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 62 deletions.
26 changes: 6 additions & 20 deletions chrome/extension/lib/chatgpt.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This library is a condensed version of chatgpt.js v3.3.1
// This library is a condensed version of chatgpt.js v3.3.2
// © 2023–2024 KudoAI & contributors under the MIT license.
// Source: https://github.com/KudoAI/chatgpt.js
// User guide: https://chatgptjs.org/userguide
Expand Down Expand Up @@ -242,19 +242,9 @@ const chatgpt = {

footer: { get() { return document.querySelector('main form')?.parentNode.parentNode.nextElementSibling; }},
getFooterDiv() { return chatgpt.footer.get(); },

getNewChatButton() {
return document.querySelector('button:has([d*="M15.6729"],' // pencil-on-pad icon
+ '[d^="M3.06957"])'); // refresh icon if temp chat
},

getNewChatButton() { return document.querySelector('button[data-testid*="new-chat-button"]'); },
getNewChatLink() { return document.querySelector('nav a[href="/"]'); },

getSendButton() {
return document.querySelector('[data-testid="send-button"]') // pre-GPT-4o
|| document.querySelector('path[d*="M15.192 8.906a1.143"]')?.parentNode.parentNode; // post-GPT-4o
},

getSendButton() { return document.querySelector('[data-testid="send-button"]'); },
isDarkMode() { return document.documentElement.classList.toString().includes('dark'); },
isFullScreen() { return chatgpt.browser.isFullScreen(); },

Expand Down Expand Up @@ -471,13 +461,9 @@ const chatgpt = {
},

toggle() {
const isMobileDevice = chatgpt.browser.isMobile(),
navBtnSelector = isMobileDevice ? 'button' : 'nav button',
isToggleBtn = isMobileDevice ? () => true // since 1st one is toggle
: btn => btn.querySelector('svg path[d^="M8.857"]');
for (const btn of document.querySelectorAll(navBtnSelector))
if (isToggleBtn(btn)) { btn.click(); return; }
console.error('Sidebar toggle not found!');
const sidebarToggle = document.querySelector('button[data-testid*="sidebar-button"]');
if (!sidebarToggle) console.error('Sidebar toggle not found!');
sidebarToggle.click();
}
},

Expand Down
26 changes: 6 additions & 20 deletions edge/extension/lib/chatgpt.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This library is a condensed version of chatgpt.js v3.3.1
// This library is a condensed version of chatgpt.js v3.3.2
// © 2023–2024 KudoAI & contributors under the MIT license.
// Source: https://github.com/KudoAI/chatgpt.js
// User guide: https://chatgptjs.org/userguide
Expand Down Expand Up @@ -242,19 +242,9 @@ const chatgpt = {

footer: { get() { return document.querySelector('main form')?.parentNode.parentNode.nextElementSibling; }},
getFooterDiv() { return chatgpt.footer.get(); },

getNewChatButton() {
return document.querySelector('button:has([d*="M15.6729"],' // pencil-on-pad icon
+ '[d^="M3.06957"])'); // refresh icon if temp chat
},

getNewChatButton() { return document.querySelector('button[data-testid*="new-chat-button"]'); },
getNewChatLink() { return document.querySelector('nav a[href="/"]'); },

getSendButton() {
return document.querySelector('[data-testid="send-button"]') // pre-GPT-4o
|| document.querySelector('path[d*="M15.192 8.906a1.143"]')?.parentNode.parentNode; // post-GPT-4o
},

getSendButton() { return document.querySelector('[data-testid="send-button"]'); },
isDarkMode() { return document.documentElement.classList.toString().includes('dark'); },
isFullScreen() { return chatgpt.browser.isFullScreen(); },

Expand Down Expand Up @@ -471,13 +461,9 @@ const chatgpt = {
},

toggle() {
const isMobileDevice = chatgpt.browser.isMobile(),
navBtnSelector = isMobileDevice ? 'button' : 'nav button',
isToggleBtn = isMobileDevice ? () => true // since 1st one is toggle
: btn => btn.querySelector('svg path[d^="M8.857"]');
for (const btn of document.querySelectorAll(navBtnSelector))
if (isToggleBtn(btn)) { btn.click(); return; }
console.error('Sidebar toggle not found!');
const sidebarToggle = document.querySelector('button[data-testid*="sidebar-button"]');
if (!sidebarToggle) console.error('Sidebar toggle not found!');
sidebarToggle.click();
}
},

Expand Down
4 changes: 2 additions & 2 deletions greasemonkey/chatgpt-widescreen-mode.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
// @description:zu Engeza izinhlobo zezimodi ze-Widescreen + Fullscreen ku-ChatGPT ukuze kube nokubonakala + ukuncitsha ukusukela
// @author Adam Lui
// @namespace https://github.com/adamlui
// @version 2024.9.25.4
// @version 2024.9.25.5
// @license MIT
// @compatible chrome
// @compatible firefox
Expand All @@ -239,7 +239,7 @@
// @match *://poe.com/*
// @icon https://media.chatgptwidescreen.com/images/icons/widescreen-robot-emoji/icon48.png?9a393be
// @icon64 https://media.chatgptwidescreen.com/images/icons/widescreen-robot-emoji/icon64.png?9a393be
// @require https://cdn.jsdelivr.net/npm/@kudoai/[email protected].1/dist/chatgpt.min.js#sha256-3yMGAFfqogI8VpkYXtVDQvk3wy8kMdJaQRE/rkAM/+8=
// @require https://cdn.jsdelivr.net/npm/@kudoai/[email protected].2/dist/chatgpt.min.js#sha256-Km9krlhXv0+GNYIkPGpWra6wVqBxlikiHuhsBIK8X0k=
// @require https://cdn.jsdelivr.net/gh/adamlui/chatgpt-widescreen@8771118a60888589fc99915b38bf8a9bc792ffff/chrome/extension/lib/dom.js#sha256-WOM2ozvI9TZUDNwBvyvOaLzThOrnjZ0jnMqfE8MZilM=
// @connect cdn.jsdelivr.net
// @connect greasyfork.org
Expand Down
26 changes: 6 additions & 20 deletions opera/extension/lib/chatgpt.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This library is a condensed version of chatgpt.js v3.3.1
// This library is a condensed version of chatgpt.js v3.3.2
// © 2023–2024 KudoAI & contributors under the MIT license.
// Source: https://github.com/KudoAI/chatgpt.js
// User guide: https://chatgptjs.org/userguide
Expand Down Expand Up @@ -242,19 +242,9 @@ const chatgpt = {

footer: { get() { return document.querySelector('main form')?.parentNode.parentNode.nextElementSibling; }},
getFooterDiv() { return chatgpt.footer.get(); },

getNewChatButton() {
return document.querySelector('button:has([d*="M15.6729"],' // pencil-on-pad icon
+ '[d^="M3.06957"])'); // refresh icon if temp chat
},

getNewChatButton() { return document.querySelector('button[data-testid*="new-chat-button"]'); },
getNewChatLink() { return document.querySelector('nav a[href="/"]'); },

getSendButton() {
return document.querySelector('[data-testid="send-button"]') // pre-GPT-4o
|| document.querySelector('path[d*="M15.192 8.906a1.143"]')?.parentNode.parentNode; // post-GPT-4o
},

getSendButton() { return document.querySelector('[data-testid="send-button"]'); },
isDarkMode() { return document.documentElement.classList.toString().includes('dark'); },
isFullScreen() { return chatgpt.browser.isFullScreen(); },

Expand Down Expand Up @@ -471,13 +461,9 @@ const chatgpt = {
},

toggle() {
const isMobileDevice = chatgpt.browser.isMobile(),
navBtnSelector = isMobileDevice ? 'button' : 'nav button',
isToggleBtn = isMobileDevice ? () => true // since 1st one is toggle
: btn => btn.querySelector('svg path[d^="M8.857"]');
for (const btn of document.querySelectorAll(navBtnSelector))
if (isToggleBtn(btn)) { btn.click(); return; }
console.error('Sidebar toggle not found!');
const sidebarToggle = document.querySelector('button[data-testid*="sidebar-button"]');
if (!sidebarToggle) console.error('Sidebar toggle not found!');
sidebarToggle.click();
}
},

Expand Down

0 comments on commit 07ac303

Please sign in to comment.