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
959d4c1eb2
commit
626f41427a
1 changed files with 4 additions and 0 deletions
|
|
@ -1,4 +1,8 @@
|
|||
/* copy code to clipboard */
|
||||
function CopyToClipboard(pre) {
|
||||
pre.style.filter = 'invert(1)';
|
||||
navigator.clipboard.writeText(pre.firstElementChild.innerHTML);
|
||||
setTimeout(function() {
|
||||
pre.style.filter = 'invert(0)';
|
||||
}, 100);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue