mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-12-06 09:59:28 +00:00
general/clipboard: add a visual feedback
This commit is contained in:
parent
814e620146
commit
5b0239a46f
1 changed files with 4 additions and 0 deletions
|
|
@ -1,4 +1,8 @@
|
||||||
/* copy code to clipboard */
|
/* copy code to clipboard */
|
||||||
function CopyToClipboard(element) {
|
function CopyToClipboard(element) {
|
||||||
|
element.style.filter = 'invert(1)';
|
||||||
navigator.clipboard.writeText(element.firstElementChild.innerHTML);
|
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