diff --git a/resources/js/scriptResultPage.js b/resources/js/scriptResultPage.js index 9caa935fae20f47e858cb0f8ea3272503a5cb7f2..629493a906ea3155299ee1090d473938d5af4858 100644 --- a/resources/js/scriptResultPage.js +++ b/resources/js/scriptResultPage.js @@ -5,11 +5,11 @@ $(document).ready(function () { }); function botProtection() { - $('.result').find('a').click(function () { + $('.result').find('a').click(function (e) { var link = $(this).attr('href'); var newtab = false; var top = false; - if ($(this).attr('target') == '_blank') { + if ($(this).attr('target') == '_blank' || e.ctrlKey) { newtab = true; } else if ($(this).attr('target') == "_top") { top = true; @@ -30,12 +30,11 @@ function botProtection() { } else { document.location.href = link; } + } else { + window.open(link, '_blank'); } }); - if (!newtab) - return false; - else - return true; + return false; }); } @@ -135,4 +134,4 @@ function loadMoreResults() { }); } }, 1000); -} \ No newline at end of file +}