Add units via JavaScript