diff options
author | Devin J. Pohly <djpohly@gmail.com> | 2011-10-27 12:06:16 -0400 |
---|---|---|
committer | Devin J. Pohly <djpohly@gmail.com> | 2011-10-27 13:24:45 -0400 |
commit | 38fd1f02bbdc5edda7daf8210a0d2b241bc9b412 (patch) | |
tree | e3c39acd94349ac78d982d7fc290a48ddde7435c /src/variables.c | |
parent | 4e9672c31ee7790cb4a0453b7d45d3e89613c035 (diff) |
add request_handler hook
This creates a handler `request_handler' in the same vein as
scheme_handler, download_handler, etc., which is called whenever the
page requests a URI. (Possible applications include Adblock and SSL
enforcement.) The handler should get the URI from $1 and print the URI
of the resource that should be loaded instead, or print nothing to allow
the request unmodified.
Diffstat (limited to 'src/variables.c')
-rw-r--r-- | src/variables.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/variables.c b/src/variables.c index 3bd941b..e414dac 100644 --- a/src/variables.c +++ b/src/variables.c @@ -711,6 +711,7 @@ const struct var_name_to_ptr_t { { "authentication_handler", PTR_V_STR(uzbl.behave.authentication_handler, 1, set_authentication_handler)}, { "scheme_handler", PTR_V_STR(uzbl.behave.scheme_handler, 1, NULL)}, + { "request_handler", PTR_V_STR(uzbl.behave.request_handler, 1, NULL)}, { "download_handler", PTR_V_STR(uzbl.behave.download_handler, 1, NULL)}, { "fifo_dir", PTR_V_STR(uzbl.behave.fifo_dir, 1, set_fifo_dir)}, |