Is there an option to execute javascript file only on plugin deactivation

Is there an option to execute javascript file only on plugin deactivation

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)