forked from Zynh0722/nyazoom
copy to clipboard?
parent
4d12dfd7e0
commit
3fb93e3598
|
@ -23,6 +23,14 @@
|
|||
link_el.innerHTML = link;
|
||||
}
|
||||
});
|
||||
|
||||
function clipboard() {
|
||||
let copyText = document.getElementById("link");
|
||||
|
||||
navigator.clipboard.writeText(copyText.href);
|
||||
|
||||
alert("Copied: " + copyText.href);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
@ -31,6 +39,8 @@
|
|||
<a id="link" href=""></a>
|
||||
</div>
|
||||
|
||||
<button class="return-button" onclick="clipboard()">Copy to Clipboard</button>
|
||||
|
||||
<a href="/" class="return-button">Return to home</a>
|
||||
</body>
|
||||
|
||||
|
|
Loading…
Reference in New Issue