mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-06-29 03:26:16 +00:00
Add clipboard function
This commit is contained in:
parent
e9e3706172
commit
76cc8456d2
4 changed files with 12 additions and 21 deletions
8
onlylegs/static/js/clipboard.js
Normal file
8
onlylegs/static/js/clipboard.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
function copyToClipboard(data) {
|
||||
try {
|
||||
navigator.clipboard.writeText(data)
|
||||
addNotification("Copied to clipboard!", 4);
|
||||
} catch (err) {
|
||||
addNotification("Oh noes, something when wrong D:", 2);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue