UglifyJS浏览器端 压缩混淆代码
代码语言:html
所属分类:其他
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>BFW NEW PAGE</title> <script id="bfwone" data="dep=jquery.17&err=0" type="text/javascript" src="http://repo.bfw.wiki/bfwrepo/js/bfwone.js"></script> <script type="text/javascript"> bready(function() { $("#codebtn").click(function(){ use(["uglify"], function() { var codes = $("#sourcecode").val(); var ast = UglifyJS.parse(codes); ast.figure_out_scope(); ast.compute_char_frequency(); ast.mangle_names(); $("#cofecode").val(ast.print_to_string()); //或者先压缩后混淆 var ast = UglifyJS.parse(codes); // compressor needs figure_out_scope too ast.figure_out_scope(); var compressor = UglifyJS.Compressor() ast = ast.transform(compressor); .........完整代码请登录后点击上方下载按钮下载查看
网友评论0