mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-12-06 18:09:28 +00:00
general/clipboard: add a visual feedback
This commit is contained in:
parent
cf6072342f
commit
b8b6214180
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