Skip to content

Commit 6f8822c

Browse files
authored
Merge pull request #15 from manics/binderlink-file
Include filepath in binder link
2 parents 2f528a2 + 3121726 commit 6f8822c

File tree

1 file changed

+3
-2
lines changed
  • jupyter_offlinenotebook/static

1 file changed

+3
-2
lines changed

jupyter_offlinenotebook/static/main.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,16 +206,17 @@ define([
206206
}
207207

208208
function showBinderLink() {
209+
var binderUrl = binderPersistentUrl + '?filepath=' + Jupyter.notebook.notebook_path;
209210
var body = $('<div/>', {
210211
'style': 'display: flex;',
211212
}).append(
212213
$('<pre/>', {
213-
'text': binderPersistentUrl,
214+
'text': binderUrl,
214215
'style': 'flex-grow: 1; margin: 0;'
215216
}));
216217
var button = $('<button/>', {
217218
'title': 'Copy binder link to clipboard',
218-
'data-url': binderPersistentUrl
219+
'data-url': binderUrl
219220
}).click(function() {
220221
copy_link_into_clipboard(this);
221222
})

0 commit comments

Comments
 (0)