From 24759ec86fe75b69012b0150179927c2e21cd5b1 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sun, 31 Jan 2010 23:02:31 +0100 Subject: [PATCH] Do not add duplicate Netscape plugins to the extensions --- midori/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/midori/main.c b/midori/main.c index 12481b80..fdfa6412 100644 --- a/midori/main.c +++ b/midori/main.c @@ -1224,7 +1224,8 @@ midori_load_netscape_plugins (gpointer data) FIXME: Ensure separators contained in the string can't break it */ gchar* value = sokoke_js_script_eval (js_context, "function plugins (l) { var f = new Array (); for (i in l) " - "{ f.push (l[i].name + '|' + l[i].filename); } return f; }" + "{ var p = l[i].name + '|' + l[i].filename; " + "if (f.indexOf (p) == -1) f.push (p); } return f; }" "plugins (navigator.plugins)", NULL); gchar** items = g_strsplit (value, ",", 0); guint i = 0; -- 2.39.5