From 6618dc4cb5cbc2746aed7a256e19d72788db2d23 Mon Sep 17 00:00:00 2001 From: Tom Adams Date: Sun, 19 Jul 2009 19:24:43 +0100 Subject: Added scheme_handler callback. Conflicts: uzbl.c uzbl.h --- README | 1 + 1 file changed, 1 insertion(+) (limited to 'README') diff --git a/README b/README index d73bab1..73b99fd 100644 --- a/README +++ b/README @@ -198,6 +198,7 @@ Some variables have callback functions which will get called after setting the v - download_handler - cookie_handler - new_window: handler to execute to invoke new uzbl window (TODO better name) + - scheme_handler: handler to be executed for all URIs not of the http/https/data schema - fifo_dir: location to store fifo's - socket_dir: location to store sockets - http_debug: http debug mode (value 0-3) -- cgit v1.2.3 From 77d97f482b887a62458ff1ca90cbe904fee5150c Mon Sep 17 00:00:00 2001 From: Tom Adams Date: Tue, 21 Jul 2009 09:00:10 +0100 Subject: Also whitelist file scheme. --- README | 2 +- uzbl.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'README') diff --git a/README b/README index 73b99fd..c97b25e 100644 --- a/README +++ b/README @@ -198,7 +198,7 @@ Some variables have callback functions which will get called after setting the v - download_handler - cookie_handler - new_window: handler to execute to invoke new uzbl window (TODO better name) - - scheme_handler: handler to be executed for all URIs not of the http/https/data schema + - scheme_handler: handler to be executed for all URIs not of the http/https/data/about/file schema - fifo_dir: location to store fifo's - socket_dir: location to store sockets - http_debug: http debug mode (value 0-3) diff --git a/uzbl.c b/uzbl.c index bb8c152..1a5094e 100644 --- a/uzbl.c +++ b/uzbl.c @@ -534,6 +534,7 @@ navigation_decision_cb (WebKitWebView *web_view, WebKitWebFrame *frame, WebKitNe if (suri && strcmp (suri->scheme, "http") && strcmp (suri->scheme, "https") && strcmp (suri->scheme, "data") && + strcmp (suri->scheme, "file") && strcmp (suri->scheme, "about")) { if (uzbl.behave.scheme_handler) { GString *s = g_string_new (""); -- cgit v1.2.3 From 5f832a74b21dfdc9b3a74d0ca1c999858132b137 Mon Sep 17 00:00:00 2001 From: Tom Adams Date: Sat, 25 Jul 2009 22:56:09 +0100 Subject: Update README for scheme_handler. --- README | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'README') diff --git a/README b/README index c97b25e..bd4d465 100644 --- a/README +++ b/README @@ -198,7 +198,7 @@ Some variables have callback functions which will get called after setting the v - download_handler - cookie_handler - new_window: handler to execute to invoke new uzbl window (TODO better name) - - scheme_handler: handler to be executed for all URIs not of the http/https/data/about/file schema + - scheme_handler: handler to execute for each URI navigated to - the navigation request will be ignored if handler prints "USED\n" - fifo_dir: location to store fifo's - socket_dir: location to store sockets - http_debug: http debug mode (value 0-3) @@ -365,6 +365,10 @@ The script specific arguments are this: $11 request address path $12 cookie (only with PUT requests) +* scheme handler: + + $8 URI of the page to be navigated to + Custom, userdefined scripts (`spawn foo bar`) get first the arguments as specified in the config and then the above 7 are added at the end. -- cgit v1.2.3