From 65694e35dea38e8b353baadba8c29795074e43cd Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Tue, 24 Nov 2020 01:05:33 +0100 Subject: Don't activate details when user wants a new tab or window I'm just digging my own grave aren't I. --- "actualit\303\251s.html" | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git "a/actualit\303\251s.html" "b/actualit\303\251s.html" index bc033fe..c0999c7 100644 --- "a/actualit\303\251s.html" +++ "b/actualit\303\251s.html" @@ -234,7 +234,10 @@ document.querySelector(anchor).classList.add('active'); document.querySelectorAll('.event a').forEach((link) => { - link.addEventListener('click', function() { + link.addEventListener('click', function(click) { + if (click.ctrlKey || click.shiftKey) + return; + var prev = document.querySelector('.details.active'); if (prev) prev.classList.remove('active'); -- cgit v1.2.3