click to copy class

This commit is contained in:
Shish 2023-01-30 21:35:12 +00:00
parent e37d87260b
commit e629d3d5ca

View file

@ -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; }