surf-adblock: remove unused headers and p->view - surf-adblock - Surf adblock web extension
 (HTM) git clone git://git.codemadness.org/surf-adblock
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 753df3b16e9c048fdb6680769326cc10c8e0a930
 (DIR) parent 55fbb08b97fe45d1d104f99ec1fe43261f322865
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Sun,  4 Jun 2017 14:29:17 +0200
       
       surf-adblock: remove unused headers and p->view
       
       don't depend on util functions in this file.
       
       Diffstat:
         M surf-adblock.c                      |      12 +-----------
       
       1 file changed, 1 insertion(+), 11 deletions(-)
       ---
 (DIR) diff --git a/surf-adblock.c b/surf-adblock.c
       @@ -1,10 +1,4 @@
       -#include <sys/stat.h>
       -#include <sys/types.h>
       -
       -#include <ctype.h>
        #include <errno.h>
       -#include <fcntl.h>
       -#include <limits.h>
        #include <stdio.h>
        #include <stdlib.h>
        #include <string.h>
       @@ -17,7 +11,6 @@
        typedef struct Page {
                guint64 id;
                WebKitWebPage *webpage;
       -        /*WebKitDOMDOMWindow *view;*/
                struct Page *next;
        } Page;
        
       @@ -50,8 +43,6 @@ documentloaded(WebKitWebPage *wp, Page *p)
                const char *uri = webkit_web_page_get_uri(p->webpage);
                char *css, *globalcss;
        
       -        /*p->view = webkit_dom_document_get_default_view(doc);*/
       -
                if ((globalcss = getglobalcss())) {
                        el = webkit_dom_document_create_element(doc, "style", NULL);
                        webkit_dom_element_set_attribute(el, "type", "text/css", NULL);
       @@ -94,8 +85,7 @@ webpagecreated(WebKitWebExtension *e, WebKitWebPage *p, gpointer unused)
                Page *np;
        
                if (!(np = newpage(p))) {
       -                weprintf("cannot associate webext with new page: %s\n",
       -                         strerror(errno));
       +                fprintf(stderr, "surf-adblock: cannot associate webext with new page\n");
                        return;
                }