diff options
| author | Shishkevich D. <135337715+shishkevichd@users.noreply.github.com> | 2025-03-07 10:27:33 +0300 |
|---|---|---|
| committer | Shishkevich D. <135337715+shishkevichd@users.noreply.github.com> | 2025-03-07 10:27:33 +0300 |
| commit | 26bf693dbdc2db0222ee37615e353f7ca1fdd3c1 (patch) | |
| tree | e5ad1ba0a99242049934892062db0d1762f0de1a /web/assets/js/util/common.js | |
| parent | 7483fb2ec57055f5f4f0fb14e559a87a5c2106f9 (diff) | |
refactor: move copy function to utils.js
Diffstat (limited to 'web/assets/js/util/common.js')
| -rw-r--r-- | web/assets/js/util/common.js | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/web/assets/js/util/common.js b/web/assets/js/util/common.js index 3aa1549e..9ad2e01f 100644 --- a/web/assets/js/util/common.js +++ b/web/assets/js/util/common.js @@ -53,24 +53,6 @@ function formatSecond(second) { } } -function copyToClipboard(text) { - // !! here old way of copying is used because not everyone can afford https connection - return new Promise((resolve) => { - const textarea = document.createElement("textarea"); - - textarea.value = text; - - document.body.appendChild(textarea); - - textarea.select(); - document.execCommand("copy"); - - document.body.removeChild(textarea); - - resolve(text) - }) -} - function addZero(num) { if (num < 10) { return "0" + num; |
