Fix #250 by using a different approach to find the url of the current script
Merge pull request #251 from codewithpassion/bugfix/250-determin-jsFileLocation

Fix #250 by using a different approach to find the url of the current script