angry birds launched on the chrome web store (http://chrome.angrybirds.c开发者_StackOverflow中文版om)
their javascript code is obfuscated and it seems better than any js obfuscation i've seen so far.
i was wondering if anyone knew what they used or know of something comparable.
It appears to be originally written in GWT -- makes sense, as there is a version running on Android which probably was written in Java...
Then optimized with the Closure Compiler in Advanced Mode (GWT supports that).
EDIT: OOOPS!
Not Advanced Mode. The output is NOT optimized by Closure Compiler's Advanced Mode. For example, symbols such as "null" are not aliased as in a Closure-obfuscated program. Also, things like "var J; var K;" will be shortened to "var J,K" by Closure. If-statements are still there which will mostly be eliminated by the compiler (replaced by && and || operators for shorter code). There also doesn't seem to be any flattening of properties or virtualizations done that are the hallmarks of the Closure Compiler.
It is difficult to check renaming of properties, as the code does not seem to be using a JavaScript library -- it looks vanilla JavaScript with DOM access.
WHAT IT LOOKS LIKE: GWT WITH CLOSURE COMPILER IN SIMPLE MODE
It looks like it has been minified by a normal JavaScript minifier. Looks like Closure Compiler in Simple Mode because:
- Variables are renamed to "a", "b" etc. -- a practice adopted by the Closure Compiler
- GWT is also a Google framework
- Line breaks in obfuscated code is not common but can be found in the Closure Compiler
It really seems to be minification from Google CC. I would say it's at the same level as free version obfuscation at jscrambler.
If I remember correctly from Google IO, and by taking a look at the source code, I am almost certain it was coded using Google Web Toolkit.
The whole project was coded in Java, then compiled and obfuscated to javascript.
精彩评论