Clicking a notebook should pass the link to custom js (instead of opening)

When I click on a .ipynb notebook on the Jupyter dashboard, it opens the notebook in a new tab in the same browser.
Instead, when I click on the notebook, I would like to get the link to the notebook in custom js and send it to cpp using a wink request, the cpp would then open the link in another browser.
Sending the link to cpp is not a problem, getting the link from the notebook is.

document.getElementsByClassName(“item_link”).innerHTML or .href doesn’t work to get the link.
$(‘a’)[1] works to get the link, but I am not able to stop jupyter from opening the notebook in the same browser.

Any help would be appreciated. Thanks a lot