Changed the way javascript is injected into a webpage