Commit fa4da5ce authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

adding event listener instead of setting it

parent 93906289
......@@ -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;
}
});
});
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment