[fix] getwatched() javascript function