Conkeror: Allow location along with lh
Let the `read_url_local_port_handler' accept an optional path parameter.
This commit is contained in:
parent
521ef4749f
commit
777530f57a
1 changed files with 7 additions and 3 deletions
|
@ -228,13 +228,17 @@ function read_url_github_command_handler(input)
|
|||
|
||||
function read_url_local_port_handler(input)
|
||||
{
|
||||
var m = /^lh (\d{1,5})$/.exec(input);
|
||||
var m = /^lh (\d{1,5})(?:\s+([a-zA-Z0-9%/]+))?$/.exec(input),
|
||||
rv = null;
|
||||
|
||||
if (m) {
|
||||
return "http://localhost:" + m[1];
|
||||
rv = "http://localhost:" + m[1];
|
||||
|
||||
if (m[2])
|
||||
rv += "/" + m[2];
|
||||
}
|
||||
|
||||
return null;
|
||||
return rv;
|
||||
}
|
||||
|
||||
read_url_handler_list = [read_url_local_port_handler,
|
||||
|
|
Loading…
Reference in a new issue