From fa6f20ba546bdba3481b68e683edd88e134c249a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Lui=20=E5=88=98=E5=B1=95=E9=B9=8F?= Date: Thu, 16 May 2024 01:42:18 -0700 Subject: [PATCH] Updated `chatgpt.sidebar.isOn()` to work w/ GPT-4o UI --- chatgpt.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chatgpt.js b/chatgpt.js index 11f475d41..2ae3e8d8d 100644 --- a/chatgpt.js +++ b/chatgpt.js @@ -1747,9 +1747,10 @@ const chatgpt = { // eslint-disable-line no-redeclare show: function() { this.isOff() ? this.toggle() : console.info('Sidebar already shown!'); }, isOff: function() { return !this.isOn(); }, isOn: function() { + const sidebar = document.querySelector('#__next > div > div'); return chatgpt.browser.isMobile() ? document.documentElement.style.overflow == 'hidden' - : document.querySelector('#__next > div > div').style.visibility != 'hidden'; + : sidebar.style.visibility != 'hidden' && sidebar.style.width != '0px'; }, toggle: function() {