Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

214
Visualizações
Override Behavior: Clicking a .ipynb notebook on the Jupyter Dashboard, serves (opens) the notebook

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.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

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

  • Set the target for all Jupyter open functions to _self instead of _blank (ensures links open in same tab, instead of new tab)
  • Using document.referrer, get the URL of the previous page
  • Using $('a').href get the link to the current page
  • Send the link to the current page and the link to the previous page to Cpp
  • Load the curr page link in a new browser using cpp, set the old browser tab to the prev link.
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda