+
95
-

javascript-obfuscator如何设置某些全局变量不混淆?

javascript-obfuscator如何设置某些全局变量不混淆?


网友回复

+
15
-

在option中增加 reservedNames: ['^globalVariable1$'],假如你想要保留globalVariable1变量名不混淆。

  <script type="text/javascript">

const obfuscationResult = JavaScriptObfuscator.obfuscate(
    `
    var you="11";
    function test(){
      let   globalVariable1 = 'This will not be obfuscated';
        alert(globalVariable1);
    }
    alert(you);
    var globalVariable1 = 'This will ...

点击查看剩余70%

我知道答案,我要回答