Skip to content

Commit

Permalink
Merge branch 'master' of git+ssh://github.com/lavavu/LavaVu
Browse files Browse the repository at this point in the history
  • Loading branch information
OKaluza committed Oct 21, 2024
2 parents 5499f5d + f334f67 commit b4cadfe
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions lavavu/html/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,17 @@ function WindowInteractor(id, uid, port) {
} else {

//Several possible modes to try
//JupyterHub URL
var regex = /\/user\/[a-z0-9-]+\//i;
//Modern JupyterHub lab URL
var regex = /\/lab\//;
var parsed = regex.exec(loc.href);
if (parsed && parsed.length > 0) {
var base = parsed[0];
connect(loc.href.substring(0,parsed.index) + base + "proxy/" + port);
connect(loc.href.substring(0,parsed.index) + "/proxy/" + port);
}
//Old JupyterHub URL
regex = /\/user\/[a-z0-9-]+\//i;
parsed = regex.exec(loc.href);
if (parsed && parsed.length > 0) {
connect(loc.href.substring(0,parsed.index) + parsed[0] + "proxy/" + port);
}

if (loc.protocol != 'file:') {
Expand Down

0 comments on commit b4cadfe

Please sign in to comment.