diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/resources/js/files.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/main/resources/js/files.js b/src/main/resources/js/files.js index 2225aa0..a79cac3 100644 --- a/src/main/resources/js/files.js +++ b/src/main/resources/js/files.js @@ -236,14 +236,8 @@ function setListeners() { request.open("POST", `/share/${path}/${filename}?type=${type}`.clean()); request.onload = () => { if (request.readyState === 4) { - if (request.status === 200) { // TODO: fix clipboard in Firefox - const input = document.createElement('input'); - input.setAttribute('value', request.responseText); - document.body.appendChild(input); - input.select(); - document.execCommand('copy'); - document.body.removeChild(input); - alert(`Copied url to clipboard!\n${request.responseText}`); + if (request.status === 200) { + window.prompt("Copy with Ctrl+C", request.responseText); } else { alert("Something went wrong."); } |