I just uploaded a one day project (Well.. maybe a day and a half) that's tangentially related to my main project. I needed a way of "locking" javascript code to specific customer domains. As soon as I had written it I thought, "This would probably make a pretty cool stand-alone
You should also provide non obfuscated script. I wouldn't be comfortable putting this on website without analyzing it.
You're free to beautify it : )
Just to be responsible:
I already mention this on the site, but I feel the need to say it again here because there are some less-technical users around: If you need true security, please do not depend this or any other client side solution.
The only true security is via server authentication. Javascript domain locks are cool deterrents to casual copying and theft. Any truly determined coder can get around them with enough time and effort.
Is this Security through Obscurity?
https://en.wikipedia.org/wiki/Security_through_obscurity
It's not "security" of any kind. As stated both here and on the site, please do not use this if you need security.