From 26bf693dbdc2db0222ee37615e353f7ca1fdd3c1 Mon Sep 17 00:00:00 2001 From: "Shishkevich D." <135337715+shishkevichd@users.noreply.github.com> Date: Fri, 7 Mar 2025 07:27:33 +0000 Subject: refactor: move copy function to utils.js --- web/assets/js/util/common.js | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'web/assets/js/util/common.js') 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; -- cgit v1.2.3