reversi/static/script.js

10 lines
294 B
JavaScript

function copyURI(evt) {
evt.preventDefault();
navigator.clipboard.writeText(evt.target.getAttribute('href')).then(() => {
/* clipboard successfully set */
document.getElementById("urlForCopy").innerHTML = "copied";
}, () => {
/* clipboard write failed */
});
}