Skip to content

Commit

Permalink
clip: make cleaned URL clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
myhro committed Sep 14, 2024
1 parent bca1b30 commit 1b82188
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion clip/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@

const url = await cleanURL(content);
navigator.clipboard.writeText(url);
output.textContent = 'Cleaned URL: ' + url;

const link = document.createElement('a');
link.href = url;
link.textContent = url;
link.target = '_blank';

output.innerHTML = 'Cleaned URL: ' + link.outerHTML;
output.innerHTML += '<br><br> Copied to the clipboard'
}

Expand Down

0 comments on commit 1b82188

Please sign in to comment.