diff --git a/src/content/index.html b/src/content/index.html index a70497b..c9066ba 100755 --- a/src/content/index.html +++ b/src/content/index.html @@ -141,22 +141,22 @@
local_offer - - + +
- bug_report - -
- pageview - - diff --git a/src/content/render.js b/src/content/render.js index f0cc416..485198b 100644 --- a/src/content/render.js +++ b/src/content/render.js @@ -67,10 +67,10 @@ const projectConfigs = { }, yukiHookApiConfig: { entryClassName: '', - debugTagName: '', + debugLogTagName: '', supportResourcesHook: 0, enableDebug: 0, - enablePrintLogcat: 0, + enableDebugLog: 0, enableYPrefsCache: 0, enableResourcesCache: 0, enableModuleStatus: 0, @@ -301,13 +301,13 @@ const configForm = { appTargetApiText: () => $('#app_target_api_text').val(), xposedMinApiText: () => $('#xposed_min_api_text').val(), entryClassNameText: () => $('#entry_class_name_text').val(), - debugTagNameText: () => $('#debug_tag_name_text').val(), + debugLogTagNameText: () => $('#debug_log_tag_name_text').val(), compomentSelect: () => valUtils.integerOf($('#compoment_select option:selected').val()), targetXposedPlatformSelect: () => valUtils.integerOf($('#target_xposed_platform_select option:selected').val()), newXSharePrefsSelect: () => valUtils.integerOf($('#new_xshare_prefs_select option:selected').val()), supportResourcesHookSelect: () => valUtils.integerOf($('#support_resources_hook_select option:selected').val()), enableDebugSelect: () => valUtils.integerOf($('#enable_debug_select option:selected').val()), - enablePrintLogcatSelect: () => valUtils.integerOf($('#enable_print_logcat_select option:selected').val()), + enableDebugLogSelect: () => valUtils.integerOf($('#enable_debug_log_select option:selected').val()), enableYPrefsCacheSelect: () => valUtils.integerOf($('#enable_yprefs_cache_select option:selected').val()), enableResourcesCacheSelect: () => valUtils.integerOf($('#enable_resources_cache_select option:selected').val()), enableModuleStatusSelect: () => valUtils.integerOf($('#enable_module_status_select option:selected').val()), @@ -343,10 +343,10 @@ const build = { projectConfigs.basicConfig.newXSharePrefs = configForm.newXSharePrefsSelect(); projectConfigs.basicConfig.moduleScopes = moduleScope.moduleScopesData(); projectConfigs.yukiHookApiConfig.entryClassName = configForm.entryClassNameText(); - projectConfigs.yukiHookApiConfig.debugTagName = configForm.debugTagNameText(); + projectConfigs.yukiHookApiConfig.debugLogTagName = configForm.debugLogTagNameText(); projectConfigs.yukiHookApiConfig.supportResourcesHook = configForm.supportResourcesHookSelect(); projectConfigs.yukiHookApiConfig.enableDebug = configForm.enableDebugSelect(); - projectConfigs.yukiHookApiConfig.enablePrintLogcat = configForm.enablePrintLogcatSelect(); + projectConfigs.yukiHookApiConfig.enableDebugLog = configForm.enableDebugLogSelect(); projectConfigs.yukiHookApiConfig.enableYPrefsCache = configForm.enableYPrefsCacheSelect(); projectConfigs.yukiHookApiConfig.enableResourcesCache = configForm.enableResourcesCacheSelect(); projectConfigs.yukiHookApiConfig.enableModuleStatus = configForm.enableModuleStatusSelect(); @@ -615,13 +615,13 @@ const configTemplate = { $('#app_target_api_text').val(data.basicConfig.appTargetApi); $('#xposed_min_api_text').val(data.basicConfig.xposedMinApi); $('#entry_class_name_text').val(data.yukiHookApiConfig.entryClassName); - $('#debug_tag_name_text').val(data.yukiHookApiConfig.debugTagName); + $('#debug_log_tag_name_text').val(data.yukiHookApiConfig.debugLogTagName); $('#compoment_select').val(data.basicConfig.moduleCompoment); $('#target_xposed_platform_select').val(data.basicConfig.targetXposedPlatform); $('#new_xshare_prefs_select').val(data.basicConfig.newXSharePrefs); $('#support_resources_hook_select').val(data.yukiHookApiConfig.supportResourcesHook); $('#enable_debug_select').val(data.yukiHookApiConfig.enableDebug); - $('#enable_print_logcat_select').val(data.yukiHookApiConfig.enablePrintLogcat); + $('#enable_debug_log_select').val(data.yukiHookApiConfig.enableDebugLog); $('#enable_yprefs_cache_select').val(data.yukiHookApiConfig.enableYPrefsCache); $('#enable_resources_cache_select').val(data.yukiHookApiConfig.enableResourcesCache); $('#enable_module_status_select').val(data.yukiHookApiConfig.enableModuleStatus); diff --git a/src/libs/locale.js b/src/libs/locale.js index 1249683..01ba9ad 100644 --- a/src/libs/locale.js +++ b/src/libs/locale.js @@ -121,9 +121,9 @@ const locale = { "addApps": "Add apps", "entryClassName": "Entry class name (When blank use the default value)", "addResourcesHookSupport": "Add Resources Hook support", - "debugTagName": "Debug TAG name (Default is YukiHookAPI)", + "debugLogTagName": "Debug log TAG name (Default is YukiHookAPI)", "enableDebugMode": "Enable debug mode", - "enablePrintLogcat": "Enable debug log output", + "enableDebugLog": "Enable debug log output", "enableYukiHookModulePrefsCache": "Enable YukiHookModulePrefs key-value caching", "enableModuleResourcesCache": "Enable module Resources caching", "enableModuleStatus": "Enable module activation status listening", @@ -256,9 +256,9 @@ const locale = { "addApps": "添加应用", "entryClassName": "入口类名 (不填使用默认值生成)", "addResourcesHookSupport": "添加 Resources Hook 支持", - "debugTagName": "Debug TAG 名称 (不填默认为 YukiHookAPI)", + "debugLogTagName": "调试日志 TAG 名称 (不填默认为 YukiHookAPI)", "enableDebugMode": "启用 Debug 模式", - "enablePrintLogcat": "启用调试日志输出功能", + "enableDebugLog": "启用调试日志输出功能", "enableYukiHookModulePrefsCache": "启用 YukiHookModulePrefs 键值缓存功能", "enableModuleResourcesCache": "启用模块 Resources 缓存功能", "enableModuleStatus": "启用模块激活状态监听功能", @@ -391,9 +391,9 @@ const locale = { "addApps": "アプリを追加", "entryClassName": "エントリクラス名(デフォルトを使用するには空)", "addResourcesHookSupport": "リソースフックのサポートを追加", - "debugTagName": "デバッグタグ名(デフォルトはYukiHookAPI)", + "debugLogTagName": "デバッググロタグ名(デフォルトはYukiHookAPI)", "enableDebugMode": "デバッグモードを有効にする", - "enablePrintLogcat": "デバッグログ出力を有効にする", + "enableDebugLog": "デバッグログ出力を有効にする", "enableYukiHookModulePrefsCache": "YukiHookModulePrefsのKey-Valueキャッシングを有効にする", "enableModuleResourcesCache": "モジュールリソースのキャッシュを有効にする", "enableModuleStatus": "モジュールのアクティブ化ステータスの監視を有効にする", diff --git a/src/transaction.js b/src/transaction.js index 25271d8..b056dff 100644 --- a/src/transaction.js +++ b/src/transaction.js @@ -210,9 +210,11 @@ const transaction = { supportResourcesHook: (isEnabled) => 'isUsingResourcesHook = ' + (isEnabled ? 'true' : 'false') }, configs: { - debugTagName: (name) => 'debugTag = "' + name + '"', + debugLog: { + tagName: (name) => 'tag = "' + name + '"', + enable: (isEnabled) => 'isEnable = ' + (isEnabled ? 'true' : 'false') + }, enableDebug: (isEnabled) => 'isDebug = ' + (isEnabled ? 'true' : 'false'), - enablePrintLogcat: (isEnabled) => 'isAllowPrintingLogs = ' + (isEnabled ? 'true' : 'false'), enableYPrefsCache: (isEnabled) => 'isEnableModulePrefsCache = ' + (isEnabled ? 'true' : 'false'), enableResourcesCache: (isEnabled) => 'isEnableModuleAppResourcesCache = ' + (isEnabled ? 'true' : 'false'), enableModuleStatus: (isEnabled) => 'isEnableHookModuleStatus = ' + (isEnabled ? 'true' : 'false'), @@ -331,15 +333,23 @@ const transaction = { hookEntryAnnotationCode.trim().substring(0, hookEntryAnnotationCode.trim().lastIndexOf(',')) : hookEntryAnnotationCode.trim()) + ')'; let hookEntryConfigsCode = ''; - if (configs.yukiHookApiConfig.debugTagName !== '') - hookEntryConfigsCode = codeFiles.append(hookEntryConfigsCode, - codeFiles['HookEntry.kt'].configs.debugTagName(configs.yukiHookApiConfig.debugTagName)); + if (configs.yukiHookApiConfig.debugLogTagName !== '' || configs.yukiHookApiConfig.enableDebugLog !== 0) { + hookEntryConfigsCode += 'debugLog {\n'; + hookEntryConfigsCode += codeFiles.space(12); + if (configs.yukiHookApiConfig.debugLogTagName !== '') { + hookEntryConfigsCode = codeFiles.append(hookEntryConfigsCode, + codeFiles['HookEntry.kt'].configs.debugLog.tagName(configs.yukiHookApiConfig.debugLogTagName)); + if (configs.yukiHookApiConfig.enableDebugLog !== 0) hookEntryConfigsCode += codeFiles.space(4); + } + if (configs.yukiHookApiConfig.enableDebugLog !== 0) + hookEntryConfigsCode = codeFiles.append(hookEntryConfigsCode, + codeFiles['HookEntry.kt'].configs.debugLog.enable(configs.yukiHookApiConfig.enableDebugLog === 1)); + hookEntryConfigsCode += '}\n'; + hookEntryConfigsCode += codeFiles.space(8); + } if (configs.yukiHookApiConfig.enableDebug !== 0) hookEntryConfigsCode = codeFiles.append(hookEntryConfigsCode, codeFiles['HookEntry.kt'].configs.enableDebug(configs.yukiHookApiConfig.enableDebug === 1)); - if (configs.yukiHookApiConfig.enablePrintLogcat !== 0) - hookEntryConfigsCode = codeFiles.append(hookEntryConfigsCode, - codeFiles['HookEntry.kt'].configs.enablePrintLogcat(configs.yukiHookApiConfig.enablePrintLogcat === 1)); if (configs.yukiHookApiConfig.enableYPrefsCache !== 0) hookEntryConfigsCode = codeFiles.append(hookEntryConfigsCode, codeFiles['HookEntry.kt'].configs.enableYPrefsCache(configs.yukiHookApiConfig.enableYPrefsCache === 1));