Commit 7e53f9bb authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

prevent double event listener

parent 171f8c24
......@@ -21,7 +21,7 @@ let link, newtab, top;
function botProtection() {
document.querySelectorAll(".result a").forEach((element) => {
element.addEventListener("click", e => {
element.onclick = e => {
link = element.href;
newtab = false;
top = false;
......@@ -48,7 +48,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