Modifies the provided script text and ensures the script content is executed in the correct location.
Useful links