mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-12-06 01:49:28 +00:00
general/clipboard: add a visual feedback
This commit is contained in:
parent
a61fbfb75c
commit
4f778cb1c6
1 changed files with 4 additions and 0 deletions
|
|
@ -1,4 +1,8 @@
|
|||
/* copy code to clipboard */
|
||||
function CopyToClipboard(element) {
|
||||
element.style.filter = 'invert(1)';
|
||||
navigator.clipboard.writeText(element.firstElementChild.innerHTML);
|
||||
setTimeout(function() {
|
||||
element.style.filter = 'invert(0)';
|
||||
}, 100);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue