summaryrefslogtreecommitdiff
path: root/surf.c
diff options
context:
space:
mode:
authorQuentin Rameau <quinq@fifth.space>2015-11-23 22:12:00 +0100
committerQuentin Rameau <quinq@fifth.space>2016-09-22 10:21:31 +0200
commitda5290a41aac4eabef83f6b88039f44d28b0ea00 (patch)
treecab3224d386b9005808b44f2b2b86885e9fb2403 /surf.c
parentc64c368d86a4319e43b7ff3d73a4afe0f4e8adf0 (diff)
downloadsurf-da5290a41aac4eabef83f6b88039f44d28b0ea00.tar.gz
surf-da5290a41aac4eabef83f6b88039f44d28b0ea00.tar.bz2
surf-da5290a41aac4eabef83f6b88039f44d28b0ea00.zip
Add support for loading Webkit extensions
Diffstat (limited to 'surf.c')
-rw-r--r--surf.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/surf.c b/surf.c
index 29b9ede..fb3ef81 100644
--- a/surf.c
+++ b/surf.c
@@ -175,6 +175,7 @@ static void cleanup(void);
/* GTK/WebKit */
static WebKitWebView *newview(Client *c, WebKitWebView *rv);
+static void initwebextensions(WebKitWebContext *wc, Client *c);
static GtkWidget *createview(WebKitWebView *v, WebKitNavigationAction *a,
Client *c);
static gboolean buttonreleased(GtkWidget *w, GdkEvent *e, Client *c);
@@ -980,6 +981,8 @@ newview(Client *c, WebKitWebView *rv)
g_signal_connect(G_OBJECT(context), "download-started",
G_CALLBACK(downloadstarted), c);
+ g_signal_connect(G_OBJECT(context), "initialize-web-extensions",
+ G_CALLBACK(initwebextensions), c);
v = g_object_new(WEBKIT_TYPE_WEB_VIEW,
"settings", settings,
@@ -1012,6 +1015,12 @@ newview(Client *c, WebKitWebView *rv)
return v;
}
+void
+initwebextensions(WebKitWebContext *wc, Client *c)
+{
+ webkit_web_context_set_web_extensions_directory(wc, WEBEXTDIR);
+}
+
GtkWidget *
createview(WebKitWebView *v, WebKitNavigationAction *a, Client *c)
{