register javascript