mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-12-06 01:49:28 +00:00
general/clipboard: use textContent...
... and avoid having html entity encoded characters in clipboard.
This commit is contained in:
parent
79c98a4b3a
commit
699be25b64
1 changed files with 1 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
/* copy code to clipboard */
|
/* copy code to clipboard */
|
||||||
function CopyToClipboard(element) {
|
function CopyToClipboard(element) {
|
||||||
element.style.filter = 'invert(1)';
|
element.style.filter = 'invert(1)';
|
||||||
navigator.clipboard.writeText(element.firstElementChild.innerHTML);
|
navigator.clipboard.writeText(element.firstElementChild.textContent);
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
element.style.filter = 'invert(0)';
|
element.style.filter = 'invert(0)';
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue