Welcome to WebmasterWorld Guest from 188.8.131.52
Forum Moderators: open
You could test if the request for the .js file has a referrer from a legitimate file, and deny it otherwise, but it is not foolproof. Some browsers and proxies doesn't send the referrer header, and it can be faked.
So, something can be done, but nothing that is perfectly safe.