mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-12-06 01:49:28 +00:00
contrib/html: support click on code block to copy to clipboard
This commit is contained in:
parent
638258000b
commit
903a3f44a0
3 changed files with 7 additions and 0 deletions
4
general/clipboard.js
Normal file
4
general/clipboard.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
/* copy code to clipboard */
|
||||
function CopyToClipboard(element) {
|
||||
navigator.clipboard.writeText(element.firstElementChild.innerHTML);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue