diff --git a/webssh/static/js/main.js b/webssh/static/js/main.js index 814610a..1de6aa0 100644 --- a/webssh/static/js/main.js +++ b/webssh/static/js/main.js @@ -52,8 +52,11 @@ function updateSSHlink() { var passwdstr = document.getElementById("password").value; var passwdstrAfterBase64 = window.btoa(passwdstr); + var initcmdstr = document.getElementById("initcmd").value; + var initcmdstrAfterURI = encodeURIComponent(initcmdstr); + var sshlinkstr; - sshlinkstr = thisPageProtocol+"//"+thisPageUrl+"/?hostname="+hostnamestr+"&port="+portstr+"&username="+usrnamestr+"&password="+passwdstrAfterBase64; + sshlinkstr = thisPageProtocol+"//"+thisPageUrl+"/?hostname="+hostnamestr+"&port="+portstr+"&username="+usrnamestr+"&password="+passwdstrAfterBase64+"&command="+initcmdstrAfterURI; document.getElementById("sshlink").innerHTML = sshlinkstr; } diff --git a/webssh/templates/index.html b/webssh/templates/index.html index 1f56af8..fe5ce2d 100644 --- a/webssh/templates/index.html +++ b/webssh/templates/index.html @@ -77,6 +77,8 @@
+ +