X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/b128a0b6d3d312f44110b7736bc5a0bfee811e95..6b22a6200e8f72d3260d292800a8786666623bfc:/Plugson/www/static/js/vtoy.js diff --git a/Plugson/www/static/js/vtoy.js b/Plugson/www/static/js/vtoy.js index cbffd04..6871925 100644 --- a/Plugson/www/static/js/vtoy.js +++ b/Plugson/www/static/js/vtoy.js @@ -2,6 +2,13 @@ function ventoy_replace_slash(str) { var str1 = str.replace(/\\/g, '/'); var str2 = str1.replace(/\/\//g, '/'); + + if (str2 && str2.length > 0) { + if (str2.substr(-1) === "/") { + return str2.substr(0, str2.length - 1); + } + } + return str2; } @@ -479,6 +486,8 @@ var g_vtoy_cur_language_en = "STR_SECURE_BOOT_ENABLE": "Enable", "STR_SECURE_BOOT_DISABLE": "Disable", "STR_SYNTAX_ERROR_TIP": "Syntax error detected in ventoy.json, so the configuration is not loaded!", + "STR_INVALID_CONFIG_TIP": "Invalid configuration detected in ventoy.json, so the configuration is not loaded!", + "STR_CONFIG_SAVE_ERROR_TIP": "Failed to write ventoy.json file. Check VentoyPlugson.log for more details!", "STR_XXX": "xxx" }; @@ -613,7 +622,8 @@ var g_vtoy_cur_language_cn = "STR_SECURE_BOOT_ENABLE": "开启", "STR_SECURE_BOOT_DISABLE": "未开启", "STR_SYNTAX_ERROR_TIP": "ventoy.json 文件中存在语法错误,配置未加载!", - + "STR_INVALID_CONFIG_TIP": "ventoy.json 文件中存在错误配置,配置未加载!", + "STR_CONFIG_SAVE_ERROR_TIP": "ventoy.json 文件写入失败,详细信息请参考 VentoyPlugson.log 文件!", "STR_XXX": "xxx"