By default, when a .ipynb notebook is clicked on the Jupyter Dashboard, it opens the notebook in a new tab. I would like to override this behavior, so, clicking the .ipynb file should just send the notebook link (that was supposed to be opened) to custom.js without serving (opening) the notebook.
Once the link is available in custom.js, I send it to C++ using a wink Request, which then opens the link in a different browser.
Help Needed: getting the link in custom.js and stopping the notebook from executing
I am able to get the link in custom.js using something hacky: $('a')[1]
But I still have no idea on how to stop Jupyter from serving the notebook.
Is this possible? Digging through the docs, I found this extra_services but can I create a handler for this purpose?
Any help is appreciated, thanks.
I couldn't find a way to officially do this, no answers on here or on Jupyter Community Forum.
I got it working using a not so efficient hacky solution, which I am sharing here.
The process
$('a').href get the link to the current page