summaryrefslogtreecommitdiff
path: root/copyurl.js
diff options
context:
space:
mode:
Diffstat (limited to 'copyurl.js')
-rw-r--r--copyurl.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/copyurl.js b/copyurl.js
new file mode 100644
index 0000000..421ab2c
--- /dev/null
+++ b/copyurl.js
@@ -0,0 +1,13 @@
+function copyURL() {
+ var copyText = document.getElementById("url");
+ navigator.clipboard.writeText(copyText.href);
+ copyText.classList.add("highlight");
+ window.setTimeout(() => copyText.classList.remove("highlight"), 1500);
+ document.getElementById('share-notice').style.display = "none";
+ document.getElementById('shared-notice').style.display = "initial";
+}
+
+function resetURL() {
+ document.getElementById('share-notice').style.display = "initial";
+ document.getElementById('shared-notice').style.display = "none";
+}