some improvements to the copy protection javascript