From 777530f57a5c56af9687ce0eeffab4b6f8f70c46 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Wed, 16 Jan 2013 01:31:36 +0100 Subject: Conkeror: Allow location along with lh Let the `read_url_local_port_handler' accept an optional path parameter. --- .conkerorrc/init.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to '.conkerorrc/init.js') 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, -- cgit v1.2.3-54-g00ecf