Search code examples
javascriptgreasemonkeyobfuscationcopy-protection

Protect Greasemonkey scripts?


I know that anything that is downloaded and is in the user's possession is going to be pretty hard to protect, but I'm just wanting to hear opinions. I'm thinking of selling a script (made with Greasemonkey...), and I want to be able to prevent the user from easily viewing the source code, or sending it to others. Thanks in advance.


Solution

  • As with any javascript, complete protection is impossible due to the nature of the language, see:

    Javascript library: to obfuscate or not to obfuscate - that is the question and How can I obfuscate (protect) JavaScript?

    However, you can obfuscate your javascript code or minify it, neither of which will completely protect it, but they will make it less human-readable.