click to copy class
This commit is contained in:
parent
e37d87260b
commit
e629d3d5ca
1 changed files with 7 additions and 0 deletions
|
@ -69,6 +69,13 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
});
|
||||
});
|
||||
|
||||
/** setup copyable things */
|
||||
$(".shm-clicktocopy").each(function(idx, elm) {
|
||||
$(elm).click(function(e) {
|
||||
navigator.clipboard.writeText($(elm).text());
|
||||
});
|
||||
});
|
||||
|
||||
/** setup arrow key bindings **/
|
||||
document.addEventListener("keyup", function(e) {
|
||||
if ($(e.target).is('input,textarea')) { return; }
|
||||
|
|
Reference in a new issue