fixed copy to clipboard function

This commit is contained in:
Malte 2022-04-05 08:19:12 +02:00
parent f291902dc4
commit c60db60647

View File

@ -132,7 +132,13 @@ $("button.copyUrlToClipboard").click(function () {
let password = document.getElementById('host-password_'+id).innerHTML
let out = location.protocol + '//' +username.trim()+':'+password.trim()+'@'+ domain
out +='/update?hostname='+hostname
navigator.clipboard.writeText(out.trim());
let dummy = document.createElement("textarea");
document.body.appendChild(dummy);
dummy.value = out;
dummy.select();
document.execCommand("copy");
document.body.removeChild(dummy);
});
function randomHash() {