Skip to content

Commit

Permalink
DOC: fix nbviewer link
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeier committed Jan 1, 2023
1 parent 6d69742 commit 3bd443e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,17 @@
<span style="white-space: nowrap;"><a href="https://mybinder.org/v2/gh/spatialaudio/nbsphinx/{{ env.config.release|e }}?filepath={{ docname|e }}"><img alt="Binder badge" src="https://mybinder.org/badge_logo.svg" style="vertical-align:text-bottom"></a>.</span>
<script>
if (document.location.host) {
$(document.currentScript).replaceWith(
'<a class="reference external" ' +
'href="https://nbviewer.jupyter.org/url' +
let nbviewer_link = document.createElement('a');
nbviewer_link.setAttribute('href',
'https://nbviewer.org/url' +
(window.location.protocol == 'https:' ? 's/' : '/') +
window.location.host +
window.location.pathname.slice(0, -4) +
'ipynb">View in <em>nbviewer</em></a>.'
);
'ipynb');
nbviewer_link.innerHTML = 'View in <em>nbviewer</em>';
nbviewer_link.classList.add('reference');
nbviewer_link.classList.add('external');
document.currentScript.replaceWith(nbviewer_link, '.');
}
</script>
</div>
Expand Down

0 comments on commit 3bd443e

Please sign in to comment.