Fix web UI to work on remote URLs

This commit is contained in:
Solomon Hykes 2013-01-29 15:30:32 -08:00
parent 0d9db39539
commit 35f5cc239b

View file

@ -188,7 +188,7 @@ b)}catch(f){i(f,"onCommandChange");throw f;}t()},commands:x});O.append(b);l.enab
if (command !== '') {
console.log(command);
try {
var url = "http://localhost:8080/" + command.split(" ")[0] + "?" + $.param(command.split(" ").slice(1).map(function(e) { return {name: "q", value: e} }))
var url = "/" + command.split(" ")[0] + "?" + $.param(command.split(" ").slice(1).map(function(e) { return {name: "q", value: e} }))
console.log(url);
$.ajax(url).done(function(data) {
term.echo(new String(data));