reversi/static/join.js

12 lines
374 B
JavaScript
Raw Permalink 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 */
2022-01-30 13:21:45 +00:00
document.getElementById("urlForCopy").innerHTML = "failed to copy :\(";
2022-01-29 21:26:32 +00:00
});
}