From ab443f58d08bd7661c864091d6d0257a5970ae06 Mon Sep 17 00:00:00 2001 From: ldinc Date: Sat, 14 Oct 2017 03:20:42 +0300 Subject: [PATCH] #301: change rexexp to String.split() --- static/js/app.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/static/js/app.js b/static/js/app.js index 4b4e0c4..10002b0 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -191,8 +191,6 @@ function resetTable() { removeClass("no-crop"); } -var tableNameRegExp = /(?:\.([^.]+))?$/; - function performTableAction(table, action, el) { if (action == "truncate" || action == "delete") { var message = "Are you sure you want to " + action + " table " + table + " ?"; @@ -227,7 +225,7 @@ function performTableAction(table, action, el) { win.focus(); break; case "copy": - copyToClipboard(tableNameRegExp.exec(table)[1]); + copyToClipboard(table.split('.')[1]); break; } }