Overload JavaScript functions