copy javascript stuff