From fa4da5ceff8f0497c46ed5a2b804638de215acf6 Mon Sep 17 00:00:00 2001
From: Dominik Hebeler <dominik@suma-ev.de>
Date: Fri, 5 Feb 2021 09:24:02 +0100
Subject: [PATCH] adding event listener instead of setting it

---
 resources/js/scriptResultPage.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/resources/js/scriptResultPage.js b/resources/js/scriptResultPage.js
index 1230557af..42b934db1 100644
--- a/resources/js/scriptResultPage.js
+++ b/resources/js/scriptResultPage.js
@@ -21,7 +21,7 @@ let link, newtab, top;
 
 function botProtection() {
   document.querySelectorAll(".result a").forEach((element) => {
-    element.onclick = (e) => {
+    element.addEventListener("click", e => {
       link = element.href;
       newtab = false;
       top = false;
@@ -49,7 +49,7 @@ function botProtection() {
           }
         });
       return newtab;
-    }
+    });
   });
 }
 
-- 
GitLab