[Xfce4-commits] <midori:master> Do not add duplicate Netscape plugins to the extensions
Christian Dywan
noreply at xfce.org
Sun Jan 31 23:04:01 CET 2010
Updating branch refs/heads/master
to 24759ec86fe75b69012b0150179927c2e21cd5b1 (commit)
from 41583dc9406f3404f62d79fa3ef24ee744028ba4 (commit)
commit 24759ec86fe75b69012b0150179927c2e21cd5b1
Author: Christian Dywan <christian at twotoasts.de>
Date: Sun Jan 31 23:02:31 2010 +0100
Do not add duplicate Netscape plugins to the extensions
midori/main.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/midori/main.c b/midori/main.c
index 12481b8..fdfa641 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;
More information about the Xfce4-commits
mailing list