From b8eaaedf53d3fef8e474e3709dc2da4b01bec426 Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Thu, 1 Feb 2024 12:13:11 +0100 Subject: [PATCH] change: shorten link text in popup --- main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 7ce308f..9e149a9 100644 --- a/main.js +++ b/main.js @@ -772,7 +772,11 @@ function showlinkdialog(link) a.setAttribute("href", link); a.setAttribute("target", "_blank"); div.onclick = removelinkdialog; - a.innerText = link; + a.innerText = "Open on " + + link.replace("https://", "") + .replace("http://", "") + .replace("www.", "") + .replace(/\/.*/, ""); } else {