[Xfce4-commits] <midori:master> Don't bother with adblocked items when saving pages with resources

Christian Dywan noreply at xfce.org
Tue Jul 24 23:18:03 CEST 2012


Updating branch refs/heads/master
         to cc0d81345ba8502636d6f83a1c09091313843a78 (commit)
       from 21d95c62f471e1b875a893baeb486996f780d50d (commit)

commit cc0d81345ba8502636d6f83a1c09091313843a78
Author: Paweł Forysiuk <tuxator at o2.pl>
Date:   Tue Jul 24 22:12:40 2012 +0200

    Don't bother with adblocked items when saving pages with resources

 midori/midori-browser.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 62d5061..5115bcf 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -1073,6 +1073,11 @@ midori_browser_save_resources (MidoriView*  view,
     {
         WebKitWebResource* resource = WEBKIT_WEB_RESOURCE (list->data);
         GString* data = webkit_web_resource_get_data (resource);
+
+        /* Resource could be adblocked, skip it in that case */
+        if (!g_strcmp0 (webkit_web_resource_get_uri (resource), "about:blank"))
+            continue;
+
         /* FIXME: mime type fallback should respect the resource's type */
         gchar* sub_filename = midori_browser_get_filename_suggestion_for_uri (
             view, webkit_web_resource_get_uri (resource));


More information about the Xfce4-commits mailing list