summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/setting.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/setting.c b/src/setting.c
index 12d7704..e081757 100644
--- a/src/setting.c
+++ b/src/setting.c
@@ -108,7 +108,9 @@ void setting_init(Client *c)
setting_add(c, "html5-local-storage", TYPE_BOOLEAN, &on, webkit, 0, "enable-html5-local-storage");
setting_add(c, "hyperlink-auditing", TYPE_BOOLEAN, &off, webkit, 0, "enable-hyperlink-auditing");
setting_add(c, "images", TYPE_BOOLEAN, &on, webkit, 0, "auto-load-images");
+#if WEBKIT_CHECK_VERSION(2, 30, 0)
setting_add(c, "intelligent-tracking-prevention", TYPE_BOOLEAN, &off, intelligent_tracking_prevention, 0, NULL);
+#endif
setting_add(c, "javascript-can-access-clipboard", TYPE_BOOLEAN, &off, webkit, 0, "javascript-can-access-clipboard");
setting_add(c, "javascript-can-open-windows-automatically", TYPE_BOOLEAN, &off, webkit, 0, "javascript-can-open-windows-automatically");
#if WEBKIT_CHECK_VERSION(2, 24, 0)
@@ -568,6 +570,7 @@ static int geolocation(Client *c, const char *name, DataType type, void *value,
return CMD_SUCCESS;
}
+#if WEBKIT_CHECK_VERSION(2, 30, 0)
static int intelligent_tracking_prevention(Client *c, const char *name, DataType type, void *value, void *data)
{
WebKitWebContext *ctx = webkit_web_view_get_context(c->webview);
@@ -575,6 +578,7 @@ static int intelligent_tracking_prevention(Client *c, const char *name, DataType
webkit_website_data_manager_set_itp_enabled(manager, *(gboolean*)value);
return CMD_SUCCESS;
}
+#endif
/* This needs to be called before the window is shown for the best chance of
* success, but it may be called at any time.