Reputation: 1001
We are developing firefox browser extension. We are able to successfully install XPI and access the features that we have developed.
Major of the logic are written in JavaScript and HTML files. So anybody can unzip the XPI file and can see the source code. How to prevent this ? Is mozilla providing any encryption mechanism ?
The same features will be developed for other browsers like Chrome.
Upvotes: 0
Views: 1174
Reputation: 1
https://en.wikipedia.org/wiki/NPAPI
All good things get banned or abused, but they keep coming back in a different way !
Upvotes: 0
Reputation: 46
You can obfuscate your JavaScript and your XPI will still work. JavaScript obfuscation keeps the functionality of your code but makes it harder to read and reuse (not impossible, though).
I'll leave you here the two tools that I've already tried:
Free: uglifyjs (only minification ie. removes unnecessary characters to make it smaller);
Not-free: jscrambler (seems to be the best pick if you are looking for obfuscation);
Google: [javascript | html5] [~protect | ~obfuscate] to find more obfuscation tools.
Upvotes: 3