From 1b8218868b1d795ca158646941d3877b76448a74 Mon Sep 17 00:00:00 2001 From: Tiago Ilieve Date: Sat, 14 Sep 2024 10:02:59 -0300 Subject: [PATCH] clip: make cleaned URL clickable --- clip/index.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/clip/index.html b/clip/index.html index 063c9dd..23edc72 100644 --- a/clip/index.html +++ b/clip/index.html @@ -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 += '

Copied to the clipboard' }