java: changed getFileExtension return without dot

This commit is contained in:
Aleksandr Fedorov
2023-09-13 11:27:06 +03:00
parent 5e2f812fee
commit 5a63bd47c1
8 changed files with 27 additions and 27 deletions

View File

@ -100,10 +100,10 @@ if (typeof jQuery !== "undefined") {
jq("#filePass").val("");
var fileName = jq("#hiddenFileName").val();
var posExt = fileName.lastIndexOf(".");
var posExt = fileName.lastIndexOf(".") + 1;
posExt = 0 <= posExt ? fileName.substring(posExt).trim().toLowerCase() : "";
if (ConverExtList.indexOf(posExt) === -1) {
if (!ConverExtList.includes(posExt)) {
jq("#step2").addClass("done").removeClass("current");
loadScripts();
return;
@ -177,10 +177,10 @@ if (typeof jQuery !== "undefined") {
jq("#beginView, #beginEmbedded").removeClass("disable");
var fileName = jq("#hiddenFileName").val();
var posExt = fileName.lastIndexOf(".");
var posExt = fileName.lastIndexOf(".") + 1;
posExt = 0 <= posExt ? fileName.substring(posExt).trim().toLowerCase() : "";
if (EditedExtList.indexOf(posExt) !== -1 || FillExtList.indexOf(posExt) !== -1) {
if (EditedExtList.includes(posExt) || FillExtList.includes(posExt)) {
jq("#beginEdit").removeClass("disable");
}
};