Skip to content

Commit

Permalink
added comment
Browse files Browse the repository at this point in the history
  • Loading branch information
omichel committed May 7, 2020
1 parent 0047597 commit e6a8fdb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions resources/web/wwi/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class Server { // eslint-disable-line no-unused-vars
// "wss://cyberbotics1.epfl.ch/1999/session
// ?url=webots://github.com/cyberbotics/webots/branch/master/projects/languages/python"
const n = this.url.indexOf('/session?url=', 6);
// 6 is for skipping the "ws(s)://domain" part of the URL which smallest form is 6 characters long: "ws://a"
if (n === -1) {
const m = url.lastIndexOf('/');
this.project = url.substring(this.url.indexOf('/', 6) + 1, m - 7); // e.g., "simple"
Expand Down

0 comments on commit e6a8fdb

Please sign in to comment.