Skip to content

Commit 88c3f73

Browse files
save file
1 parent a3932f5 commit 88c3f73

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

utils/editors/js-console/js-console.html

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -330,14 +330,12 @@ <h4 slot=version>
330330

331331
$(root,'#run').onclick = run;
332332

333-
334333
var r = $('#run-opts');
335334
if(window.electronAPI||localStorage['allow-host']){
336335
$('#run-opts').style.display = '';
337336
}
338337
ui.host = $.chkbox(r,'#host');
339338

340-
341339
mode.async = $.chkbox(root,'#async-root');
342340

343341

@@ -533,16 +531,28 @@ <h4 slot=version>
533531
debug('btn.obfuscator');
534532
var js = editor.getvalue();
535533

534+
var opts = {
535+
compact : true,
536+
controlFlowFlattening : true,
537+
deadCodeInjection : true,
538+
stringArrayEncoding : ['base64'],
539+
renameGlobals : true,
540+
};
541+
/*
542+
var opts = {
543+
compact : true,
544+
stringArray : true,
545+
stringArrayEncoding : ['base64'],
546+
stringArrayThreshold : 0.75,
547+
renameGlobals : false,
548+
controlFlowFlattening : false,
549+
deadCodeInjection : false,
550+
};
551+
*/
536552
var err;
537553
try{
538554

539-
var obfuscated = JavaScriptObfuscator.obfuscate(js,{
540-
compact : true,
541-
controlFlowFlattening : true,
542-
deadCodeInjection : true,
543-
stringArrayEncoding : ['base64'],
544-
renameGlobals : false
545-
});
555+
var obfuscated = JavaScriptObfuscator.obfuscate(js,opts);
546556

547557
}//try
548558
catch(err2){

0 commit comments

Comments
 (0)