Skip to content

Commit

Permalink
don't include the connect page path in the server path
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@18739 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Mar 16, 2018
1 parent d5bd2c4 commit 1ddd814
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/html5/connect.html
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,16 @@ <h4 class="panel-title">Advanced options</h4>
var url = window.location.href;
var link = document.createElement('a');
link.setAttribute('href', url);
var pathname = link.pathname;
if (pathname && Utilities.endsWith(pathname, "connect.html")) {
pathname = pathname.substring(0, pathname.length-"connect.html".length);
}
if (pathname && pathname=="/") {
pathname = "";
}
document.getElementById("server").value = getparam("server") || link.hostname;
document.getElementById("port").value = getparam("port") || link.port;
document.getElementById("path").value = getparam("path") || link.pathname;
document.getElementById("path").value = getparam("path") || pathname;
document.getElementById("username").value = getparam("username") || "";
var https = document.location.protocol=="https:";
var ssl = getboolparam("ssl", https);
Expand Down

0 comments on commit 1ddd814

Please sign in to comment.