From cb559c9daad5a1c43230a549e714d26cb71f1cf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Lui=20=E5=88=98=E5=B1=95=E9=B9=8F?= Date: Sat, 11 May 2024 07:26:55 -0700 Subject: [PATCH] Corrected error msgs in `chatgpt.menu.open()` --- chatgpt.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chatgpt.js b/chatgpt.js index 67aa2315e..6016fa9bb 100644 --- a/chatgpt.js +++ b/chatgpt.js @@ -1162,8 +1162,8 @@ const chatgpt = { // eslint-disable-line no-redeclare open: function() { const menuBtn = document.querySelector('nav [id*="menu-button"][aria-expanded="false"]'); if (menuBtn) - try { menuBtn.click(); } catch (err) { console.error('Error while closing the menu'); throw new Error(err); } - else { console.error('Menu already hidden!'); throw new Error(); } + try { menuBtn.click(); } catch (err) { console.error('Error while opening the menu'); throw new Error(err); } + else { console.error('Menu already open!'); throw new Error(); } } },