Polyfill for `document.currentScript`. Demo using old Gist @ http://jsfiddle.net/JamesMGreene/9DFc9/