From 413e03f10099d7c341bd76337b6892e0893ae445 Mon Sep 17 00:00:00 2001
From: weru <fromweru@gmail.com>
Date: Sun, 27 Dec 2020 16:56:34 +0000
Subject: [PATCH] add helpers

---
 assets/js/index.js |   23 +----------------------
 1 files changed, 1 insertions(+), 22 deletions(-)

diff --git a/assets/js/index.js b/assets/js/index.js
index c5f5842..a8e2792 100644
--- a/assets/js/index.js
+++ b/assets/js/index.js
@@ -183,27 +183,6 @@
     }
   });
 
-  const copyToClipboard = str => {
-    let copy, selection, selected;
-    copy = createEl('textarea');
-    copy.value = str;
-    copy.setAttribute('readonly', '');
-    copy.style.position = 'absolute';
-    copy.style.left = '-9999px';
-    selection = document.getSelection();
-    doc.appendChild(copy);
-    // check if there is any selected content
-    selected = selection.rangeCount > 0 ? selection.getRangeAt(0) : false;
-    copy.select();
-    document.execCommand('copy');
-    doc.removeChild(copy);
-    if (selected) { // if a selection existed before copying
-      selection.removeAllRanges(); // unselect existing selection
-      selection.addRange(selected); // restore the original selection
-    }
-  }
-
-
   function copyFeedback(parent) {
     const copyText = document.createElement('div');
     const yanked = 'link_yanked';
@@ -355,4 +334,4 @@
 
 }
 
-window.addEventListener('load', loadActions());
+window.addEventListener('load', loadActions());
\ No newline at end of file

--
Gitblit v1.10.0