Updating branch refs/heads/master
         to b8a8272398f6f01ccdbe94b53890d872bfd9315b (commit)
       from d39b62c73e83fa016b72f1d0567739b9ab9c39ea (commit)

commit b8a8272398f6f01ccdbe94b53890d872bfd9315b
Author: Christian Dywan <[email protected]>
Date:   Sat Oct 29 00:57:44 2011 +0200

    Correctly rewrite user style URI

 extensions/addons.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/extensions/addons.c b/extensions/addons.c
index 0347e15..07e997e 100644
--- a/extensions/addons.c
+++ b/extensions/addons.c
@@ -129,6 +129,7 @@ addons_install_response (GtkWidget*  infobar,
                     const gchar* js_script;
                     WebKitWebView* web_view;
                     WebKitWebFrame* web_frame;
+                    gchar** script_id;
 
                     js_script = 
"document.getElementById('heading').childNodes[3].childNodes[1].textContent";
                     web_view = WEBKIT_WEB_VIEW (midori_view_get_web_view 
(view));
@@ -144,8 +145,10 @@ addons_install_response (GtkWidget*  infobar,
                     }
 
                     /* rewrite uri to get source js */
+                    script_id = g_strsplit (subpage + 1, "/", 2);
                     temp_uri = g_strdup_printf 
("http://%s/scripts/source/%s.user.js";,
-                                                hostname, subpage + 1);
+                                                hostname, script_id[0]);
+                    g_strfreev (script_id);
                     uri = temp_uri;
                     folder = "scripts";
                 }
_______________________________________________
Xfce4-commits mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to