mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-12-06 09:59:28 +00:00
contrib/html: support click on code block to copy to clipboard
This commit is contained in:
parent
c80dd7d891
commit
1c11d77bce
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(pre) {
|
||||
navigator.clipboard.writeText(pre.firstElementChild.innerHTML);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue