about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJosh Rickmar <jrick@devio.us>2012-08-23 13:16:56 -0400
committerJosh Rickmar <jrick@devio.us>2012-08-23 13:16:56 -0400
commit541a617a252b2a9ee3b192d358c84393a3847f0b (patch)
tree6f9b64f6b1f5a3ab1e67826d425408163f20a7e9
parent1d88a7d8ce27c36a1866ec2ae0dddf176a327af0 (diff)
downloadxombrero-541a617a252b2a9ee3b192d358c84393a3847f0b.tar.gz
Marco wants new tabs only when middle-clicking (or ctrl-click)
-rw-r--r--xombrero.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/xombrero.c b/xombrero.c
index 4ab0d65..85daf52 100644
--- a/xombrero.c
+++ b/xombrero.c
@@ -4821,7 +4821,6 @@ webview_npd_cb(WebKitWebView *wv, WebKitWebFrame *wf,
 	WebKitWebNavigationReason	reason;
 	struct user_agent		ua_find, *ua;
 	char				*uri;
-	const char			*f;
 
 	if (t == NULL) {
 		show_oops(NULL, "webview_npd_cb invalid parameters");
@@ -4903,13 +4902,8 @@ webview_npd_cb(WebKitWebView *wv, WebKitWebFrame *wf,
 	reason = webkit_web_navigation_action_get_reason(na);
 	if (reason == WEBKIT_WEB_NAVIGATION_REASON_LINK_CLICKED) {
 		set_normal_tab_meaning(t);
-		if (enable_scripts == 0 && enable_cookie_whitelist == 1) {
-			f = webkit_web_navigation_action_get_target_frame(na);
-			if (!g_strcmp0(f, "_blank"))
-				create_new_tab(uri, NULL, 1, -1);
-			else
-				load_uri(t, uri);
-		}
+		if (enable_scripts == 0 && enable_cookie_whitelist == 1)
+			load_uri(t, uri);
 		webkit_web_policy_decision_use(pd);
 		return (TRUE); /* we made the decision */
 	}