From 38fd1f02bbdc5edda7daf8210a0d2b241bc9b412 Mon Sep 17 00:00:00 2001 From: "Devin J. Pohly" Date: Thu, 27 Oct 2011 12:06:16 -0400 Subject: 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. --- src/variables.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/variables.c') 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)}, -- cgit v1.2.3