Protect Greasemonkey scripts?

最后都变了- 提交于 2019-11-29 12:24:51
Josiah

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.

Really the only thing you could try would be obfuscation but that is no guaranty that nobody will be able to read your code.

Try - http://www.javascriptobfuscator.com/

With Greasemonkey, there is another option beyond JavaScript obfuscation.

You can compile your GM script into a Firefox extension instead.

Greasemonkey install makes it easy to see/get a GM's script code. But almost no civilians even know where to look for extension source files. (Of course, nothing will stop a determined programmer from getting and analyzing your code.)

One such compiler is at: http://arantius.com/misc/greasemonkey/script-compiler .

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!