Forum Moderators: phranque
All-in all, trying to "protect" JS code is usually not worth the bother. If you really believe that your JS code is so special that it needs protection, then change the script URL (on your pages) to point to a server0side script such as PHP or PERL, add code to rewrite .JS requests to that server-side script, and use the server-side script to check for the presence of a cookie that you've previously set on the 'authorized pages' of your own site (all pages that can be used to get to the page(s) that use the JS script). If the cookie isn't present, then either return an empty script, respond with a 403-Forbidden, or serve a different script, such as one that puts up an alert box. The cookie set on your pages should be a session cookie or it should be set to have a limited lifetime (say a few hours).
None of this has to do with "SEO" -- It has to do with security. Since JS code executes client-side, the impact on security is essentially zero, as long as you're not trying to use JS code for any security-related functions. And if you are, then the problem lies there, and not in the fact that the JS code is downloadable.
Jim