It comes down to whether or not the developer is happy with you 'hotlinking' to the JS library.
Regarding the specific URL that you have posted,
https://raw.github.com/Caligatio/jsSHA/master/src/sha1.js
I would be wary of referencing that. It is the master branch of their source code, they may include breaking changes at any time. They may even decide to move and restructure their codebase, in which case your application will break as the URL above will lead to a 404.
The better solution is indeed referencing a specific version of the library. This ensures that your application behaves, and will continue to behave, in an expected and known manner as far as the jsSHA library is concerned.
There are a few ways to do this. You can reference a specific, fixed URL that explicitly specifies a version
http://crypto-js.googlecode.com/svn/tags/3.0.2/build/rollups/hmac-sha1.js
Because its tagged (3.0.2), you are a bit safer, but you are still referencing source control. This should really be done via a CDN if one exists. I do not believe that the googlecode.com URL is a CDN URL (I could be wrong). It is of course a common practice to use a proper CDN or external link to reference a JS library and you can see an example of this on the JQuery page, but this is often done as part of page performance enhancements. A CDN is optimized for a user's geographic location so a reference to any content on a CDN (as opposed to the main server) will be served faster. It has user experience benefits. It's useful if page load times are important for your userbase.
The alternative, and the safest way, is to keep a copy of the JS library in your own source control and reference it using your own infrastructure. It's with you, it is a fixed version and there are no surprises if something changes, such as restructuring, sites going down, and so on.