Skip to content

Commit

Permalink
Updated chatgpt.menu.<open|close>() to always log verbose errs
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlui committed May 17, 2024
1 parent c25d3aa commit 105edbc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions chatgpt.js
Original file line number Diff line number Diff line change
Expand Up @@ -1162,14 +1162,12 @@ const chatgpt = { // eslint-disable-line no-redeclare

close: function() {
const menuBtn = document.querySelector('nav [id*="menu-button"][aria-expanded="true"]');
if (menuBtn) try { menuBtn.click(); } catch (err) { return console.error(err.message); }
else { console.info('Menu already hidden!'); }
try { menuBtn.click(); } catch (err) { console.error(err.message); }
},

open: function() {
const menuBtn = document.querySelector('nav [id*="menu-button"][aria-expanded="false"]');
if (menuBtn) try { menuBtn.click(); } catch (err) { return console.error(err.message); }
else { console.info('Menu already open!'); }
try { menuBtn.click(); } catch (err) { console.error(err.message); }
}
},

Expand Down

0 comments on commit 105edbc

Please sign in to comment.