From: Christian Dywan Date: Sun, 31 Jan 2010 22:02:31 +0000 (+0100) Subject: Do not add duplicate Netscape plugins to the extensions X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24759ec86fe75b69012b0150179927c2e21cd5b1;p=midori Do not add duplicate Netscape plugins to the extensions --- 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;