logo

badwolf

Minimalist and privacy-oriented WebKitGTK+ browser
commit: a702a8c2a7c173174804165e05f314549753e289
parent 140404d3c9ba28d75c5bccd31b405af614afe352
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sun, 11 Oct 2020 09:17:54 +0200

Enable Intelligent Tracking Protection (ITP)

Note: Permission requests are still stuck to deny by default, so third-party domains are always denied access

Diffstat:

Mbadwolf.c10++++++----
Mbookmarks.c5+++--
2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/badwolf.c b/badwolf.c @@ -4,10 +4,9 @@ #include "badwolf.h" -#include "config.h" -#include "downloads.h" #include "bookmarks.h" #include "config.h" +#include "downloads.h" #include "keybindings.h" #include "uri.h" @@ -644,11 +643,14 @@ new_browser(struct Window *window, const gchar *target_url, struct Client *old_b browser->statuslabel = gtk_label_new(NULL); gtk_widget_set_name(browser->statuslabel, "browser__statuslabel"); - WebKitWebContext *web_context = webkit_web_context_new_ephemeral(); + WebKitWebsiteDataManager *website_data_manager = webkit_website_data_manager_new_ephemeral(); + webkit_website_data_manager_set_itp_enabled(website_data_manager, TRUE); + + WebKitWebContext *web_context = + webkit_web_context_new_with_website_data_manager(website_data_manager); webkit_web_context_set_sandbox_enabled(web_context, TRUE); webkit_web_context_set_process_model(web_context, WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES); - webkit_web_context_set_web_extensions_directory(web_context, web_extensions_directory); badwolf_l10n = getenv("BADWOLF_L10N"); diff --git a/bookmarks.c b/bookmarks.c @@ -6,7 +6,7 @@ #include <glib/gprintf.h> /* g_fprintf() */ #include <gtk/gtk.h> #include <libxml/xpath.h> -#include <unistd.h> /* access() */ +#include <unistd.h> /* access() */ static gboolean location_completion_matches(GtkEntryCompletion *completion, @@ -77,7 +77,8 @@ bookmarks_completion_init() GtkTreeIter iter; GtkListStore *list_store = gtk_list_store_new(1, G_TYPE_STRING); - if(access(filename, R_OK) != 0) { + if(access(filename, R_OK) != 0) + { g_fprintf(stderr, "Bookmarks: No loadable file found at %s\n", filename); return NULL; }