Doing some security debugging on Slack desktop a year or so ago, I saw that you could easily open up a Chrome debugger port via CLI option to use with puppeteer/chromedp/etc. I haven't checked lately, but in theory it should be easy enough to connect to the debug port and run this short script to get the same benefit in the Electron app.