diff options
author | Tom Willemsen | 2013-01-16 01:31:36 +0100 |
---|---|---|
committer | Tom Willemsen | 2013-01-16 01:31:36 +0100 |
commit | 777530f57a5c56af9687ce0eeffab4b6f8f70c46 (patch) | |
tree | c798168b174cc5680306d29066f2784d5cc0a003 /.conkerorrc/init.js | |
parent | 521ef4749f1e0a9fdfe35b07ee0ecc1ddd88ecff (diff) | |
download | dotfiles-777530f57a5c56af9687ce0eeffab4b6f8f70c46.tar.gz dotfiles-777530f57a5c56af9687ce0eeffab4b6f8f70c46.zip |
Conkeror: Allow location along with lh
Let the `read_url_local_port_handler' accept an optional path
parameter.
Diffstat (limited to '.conkerorrc/init.js')
-rw-r--r-- | .conkerorrc/init.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/.conkerorrc/init.js b/.conkerorrc/init.js index 2646f25..d7080de 100644 --- a/.conkerorrc/init.js +++ b/.conkerorrc/init.js @@ -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, |