#301: change rexexp to String.split()

This commit is contained in:
ldinc 2017-10-14 03:20:42 +03:00
parent 0e2926cc85
commit ab443f58d0

View File

@ -191,8 +191,6 @@ function resetTable() {
removeClass("no-crop"); removeClass("no-crop");
} }
var tableNameRegExp = /(?:\.([^.]+))?$/;
function performTableAction(table, action, el) { function performTableAction(table, action, el) {
if (action == "truncate" || action == "delete") { if (action == "truncate" || action == "delete") {
var message = "Are you sure you want to " + action + " table " + table + " ?"; var message = "Are you sure you want to " + action + " table " + table + " ?";
@ -227,7 +225,7 @@ function performTableAction(table, action, el) {
win.focus(); win.focus();
break; break;
case "copy": case "copy":
copyToClipboard(tableNameRegExp.exec(table)[1]); copyToClipboard(table.split('.')[1]);
break; break;
} }
} }