reversi/static/script.js

11 lines
294 B
JavaScript
Raw Normal View History

2022-01-29 21:26:32 +00:00
function copyURI(evt) {
evt.preventDefault();
navigator.clipboard.writeText(evt.target.getAttribute('href')).then(() => {
/* clipboard successfully set */
document.getElementById("urlForCopy").innerHTML = "copied";
2022-01-29 21:26:32 +00:00
}, () => {
/* clipboard write failed */
});
}