Replace old JS code with new.