mholt/PapaParse — pull request #120 by edg2s (2014-11-25 22:14:00+00:00)
Title: Remove document.write for script path and allow external config

1. Use document.getElementsByTag name to find the script's path.
When used async, this fails by providing the wrong path instead
of failing catastrophically.
2. Detect if the script was loaded asynchronously by attaching a load
event to the body and seeing if it fires.
3. Evaluate the correct script path when it is requested. This gives
the user time to manually configuring it using the Papa.SCRIPT_PATH
global. If this isn't done and the script was loaded async, throw
a helpful error explaining how to fix.