summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2020-11-24 01:05:33 +0100
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2020-11-24 01:05:33 +0100
commit65694e35dea38e8b353baadba8c29795074e43cd (patch)
treed4e6c0492c9f4c863c24fd01b350b6a0c8d61465
parent1efc3082a3ec64e71ab4a6b5ed290d9473e77bc9 (diff)
downloadquatuorbellefeuille.com-65694e35dea38e8b353baadba8c29795074e43cd.tar.xz
Don't activate details when user wants a new tab or window
I'm just digging my own grave aren't I.
-rw-r--r--actualités.html5
1 files changed, 4 insertions, 1 deletions
diff --git a/actualités.html b/actualités.html
index bc033fe..c0999c7 100644
--- a/actualités.html
+++ b/actualités.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');