Override functions for javascript