Allow widget to work when dynamically inserted into middle of DOM

Previously if you dynamically added the JS to the middle of an existing DOM structure, the code to grab the `script` tag would grab the last tag, which is not necessarily `0002.js`.

This change forces it to look for the script tag with the appropriate data attribute.
Replaced $() with document.querySelector(), simplified search for script tag
Merge pull request #1277 from wbond/patch-1

Allow widget to work when dynamically inserted into middle of DOM