Execute script on dashboard open

I’d like to trigger a script (with data) whenever a dashboard is opened. This is so I can automate a browsermod id without any button press. I’m happy to write a JavaScript resource if necessary to push the button. Any pointers of where to look? I haven’t found much after searching all morning.

Thanks!

I’ve written a custom card which can do this but please let me know if I’m doing it wrong! :grinning:

Hi. Where I can find your card ?

Sorry but I gave up on this and ended up writing a custom react app using GitHub - shannonhochkins/ha-dashboard: A react dashboard interacting with home assistant.