This tool is a combination of popular auxiliary tools on the Internet, such as JavaScript obfuscation, compression, formatting, CSS compression, and CSS formatting. In order to make it easy to use, comics separates all functions and can be used offline. You do not need to call others' interfaces online for full localization. Main functions: 1. JavaScript obfuscation 2. JS compression 3. JS formatting 4. CSS compression 5. The core code of CSS formatting is as follows:
Var lCSSCoder = {format: function (s) {// format code s = s. replace (/\ s * ([\ {\} \: \; \,]) \ s */g, "$1"); s = s. replace (/; \ s *;/g, ";"); // clear the continuous semicolon s = s. replace (/\, [\ s \. \ # \ d] * {/g, "{"); s = s. replace (/([^ \ s]) \ {([^ \ s])/g, "$1 {\ n \ t $2"); s = s. replace (/([^ \ s]) \} ([^ \ n] *)/g, "$1 \ n} \ n $2"); s = s. replace (/([^ \ s]); ([^ \ s \}])/g, "$1; \ n \ t $2 "); return s;}, pack: function (s) {// Compression Code s = s. replace (/\/\*(. | \ n )*? \ * \ // G, ""); // Delete comment s = s. replace (/\ s * ([\ {\} \: \; \,]) \ s */g, "$1"); s = s. replace (/\, [\ s \. \ # \ d] * \ {/g, "{"); // fault tolerance Processing s = s. replace (/; \ s *;/g, ";"); // clear the continuous semicolon s = s. match (/^ \ s * (\ S + (\ s + \ S +) *) \ s * $ /); // remove the blank at the beginning and end of return (s = null )? "": S [1] ;}};
The effect is as follows:
Online Demo and download