As a basic answer to that question (though you have already solved it), you should always be able to replace an external script tag like:
<script type="text/javascript" src="...myjs.js"></script>
With:
Code:
<script type="text/javascript">
//Cut and Paste everything from the external file here!
</script>
(This should usually go in the <head> section of the page, but if your current external JS reference works, then replacing it like this should also work reliably.)
Note: if your .js file and HTML page are located in different directories, you may need to adjust references to external files like images.
Also, the reason for not doing this more often is that it means every time you load the page you send all that extra data instead of just caching the external .js file. If you can store it externally, that's best. But of course you can add it if you don't have external storage available.
Bookmarks