Edit inserting of script to document.