Exec an script on dashboard open

There is any way to exec an script when an certain card from dashboard is displayed ?