URI encode links for copying

This commit is contained in:
G2-Games 2024-10-24 10:17:14 -05:00
parent 2e7c194388
commit cbee7641dd

View file

@ -62,7 +62,9 @@ function makeFinished(progressBar, progressText, linkRow, linkAddress, hash) {
let button = linkRow.appendChild(document.createElement("button")); let button = linkRow.appendChild(document.createElement("button"));
button.textContent = "📝"; button.textContent = "📝";
button.addEventListener('click', function(e) { button.addEventListener('click', function(e) {
navigator.clipboard.writeText("https://" + window.location.host + "/" + linkAddress) navigator.clipboard.writeText(
encodeURI("https://" + window.location.host + "/" + linkAddress)
)
}) })
progressBar.style.display = "none"; progressBar.style.display = "none";