Cómo activar código JS si el formulario de registro se abre o se cierra?

Is it possible to monitor this event (open and closing of the signup modal) via the plugin API and fire some other JS code?

Is there a boilerplate code to monitor all events fired by the plugin API and log via the console?