talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 0ae84961ce30b9049aebb1bebe3c37bd030d282e
parent d6883c43702276c4040eb5692d5e00cdfec78455
Author: Steve Randall <srandall52@sbcglobal.net>
Date:   Mon, 10 May 2021 18:12:42 -0500

Fancy plugin: only open external links on click.

Signed-off-by: paul <paul@claws-mail.org>

Diffstat:
Msrc/plugins/fancy/fancy_viewer.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/plugins/fancy/fancy_viewer.c b/src/plugins/fancy/fancy_viewer.c @@ -459,7 +459,8 @@ navigation_policy_cb (WebKitWebView *web_view, } else if (!strncmp(viewer->cur_link, "file://", 7) || !strcmp(viewer->cur_link, "about:blank")) { debug_print("local navigation request ACCEPTED\n"); webkit_policy_decision_use(policy_decision); - } else if (viewer->override_prefs_external) { + } else if (viewer->override_prefs_external && + webkit_navigation_action_get_navigation_type(navigation_action) == WEBKIT_NAVIGATION_TYPE_LINK_CLICKED) { debug_print("remote navigation request OPENED\n"); open_uri(viewer->cur_link, prefs_common_get_uri_cmd()); webkit_policy_decision_ignore(policy_decision);