only copy script content from head, but rewrite src first