local javascript copy