From 91da5e5b9d38f071f24470fd94dd79b0baa745ab Mon Sep 17 00:00:00 2001 From: Gregg Tavares Date: Tue, 28 May 2024 10:55:23 +0900 Subject: [PATCH] Fix ctrl/cmd click issue We want ctrl/cmd click to open the window in a new tab --- src/listing.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/listing.html b/src/listing.html index f3b4267..d07275a 100644 --- a/src/listing.html +++ b/src/listing.html @@ -178,7 +178,12 @@

~{linked-path}

if (tr) { var a = tr.querySelector('a'); if (a) { - window.location.href = a.href; + if (e.metaKey || e.ctrlKey) { + e.preventDefault(); + window.open(a.href, '_blank'); + } else { + a.click(); + } } } });