The HTML5 & JS application is full of validation/injection of input, requiring developers to stay on guard. At the same time, in order to prevent piracy or at least make piracy more difficult, often use obfuscation tool to confuse JS code.
Online tools
Https://tool.lu/html/support code compression, formatting, etc.
Http://tool.chinaz.com/js.aspx supports compression, encryption and decryption
Obfuscation tool:
YUI Compressor GitHub
Google Closure Compiler
Uglifyjs
Jscrambler
Anti-obfuscation tool:
jsbeautifier.org
Jsdetox
Yuicompressor
Download: http://www.jb51.net/softs/25860.html#download
Configure the Environment: Install the JDK environment, add the JAVA_HOME environment variable, and the path to the top of the bin
Execution Install.cmd Complete
Default mode
Java-jar Yuicompressor-x.y.z.jar Myfile.js-o Myfile-min.js
With coded compression
Java-jar Yuicompressor-x.y.z.jar myfile.js-o myfile-min.js--charset utf-8
Reference:
YUI Compressor Add right-click Command to complete the shortcut compression
REF:
Technology sharing: Several common JavaScript obfuscation and anti-obfuscation tools to analyze the actual combat
HTML code obfuscation and compression