From e6a8fdb84cb3ac9290bf9e23086c9f171caa95a8 Mon Sep 17 00:00:00 2001 From: Olivier Michel Date: Thu, 7 May 2020 17:58:37 +0200 Subject: [PATCH] added comment --- resources/web/wwi/server.js | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/web/wwi/server.js b/resources/web/wwi/server.js index 53f2261dcc0..0b65cb42d33 100644 --- a/resources/web/wwi/server.js +++ b/resources/web/wwi/server.js @@ -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"