From 24f22a7cd51b2c8865cae50d2ab947e6f180ec49 Mon Sep 17 00:00:00 2001 From: cilame Date: Fri, 16 Jun 2023 01:16:13 +0800 Subject: [PATCH] add --- tools/babel_asttool.js | 1 + tools/btn_utils.js | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/babel_asttool.js b/tools/babel_asttool.js index d5195b2..f72170e 100644 --- a/tools/babel_asttool.js +++ b/tools/babel_asttool.js @@ -1275,6 +1275,7 @@ function muti_process_defusion(jscode, config){ function muti_process_sojsondefusion(jscode, config){ var ast = parser.parse(jscode); + config = config || {} if (ast.program.body.length == 1){ ast.program.body = ast.program.body[0].expression.callee.body.body diff --git a/tools/btn_utils.js b/tools/btn_utils.js index 2ad6a7f..c1a88de 100644 --- a/tools/btn_utils.js +++ b/tools/btn_utils.js @@ -45,7 +45,14 @@ function get_ob_config(){ sojsontn.addEventListener('click', function(e){ try{ - ;(txt2||txt).value = muti_process_sojsondefusion(txt.value, get_ob_config()) + try{ + ;(txt2||txt).value = muti_process_sojsondefusion(txt.value, get_ob_config()) + }catch(e){ + console.log('解密失败,尝试不配置清理 clear_ob_extra 再次解密') + var config = get_ob_config() + delete config.clear_ob_extra + ;(txt2||txt).value = muti_process_sojsondefusion(txt.value) + } }catch(e){ ;(txt2||txt).value = e.stack }