logo

badwolf

Minimalist and privacy-oriented WebKitGTK+ browser
commit: c31526e3a15ae326bbd08942c523dfc9baa82e4d
parent: 1026413b3f2ca3ebb0f2604ef34b0b6094d14c8d
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu, 31 Oct 2019 13:20:35 +0100

Move JS control to enable-javascript-markup

enable-javascript-markup toggles only the document's javascript while
enable-javascript also controls WebKit's javascript used in at least
the media player

Diffstat:

Mbadwolf.c4++--
Mconfig.h3++-
2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/badwolf.c b/badwolf.c @@ -420,7 +420,7 @@ javascriptCb_toggled(GtkButton *javascript, gpointer user_data) WebKitSettings *settings = webkit_web_view_get_settings(browser->webView); - webkit_settings_set_enable_javascript( + webkit_settings_set_enable_javascript_markup( settings, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(javascript))); webkit_web_view_set_settings(browser->webView, settings); @@ -513,7 +513,7 @@ new_browser(struct Window *window, gchar *target_url, WebKitWebView *related_web WebKitSettings *settings = webkit_settings_new_with_settings(BADWOLF_WEBKIT_SETTINGS); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(browser->javascript), - webkit_settings_get_enable_javascript(settings)); + webkit_settings_get_enable_javascript_markup(settings)); browser->webView = WEBKIT_WEB_VIEW(g_object_new(WEBKIT_TYPE_WEB_VIEW, "web-context", diff --git a/config.h b/config.h @@ -63,7 +63,8 @@ "enable-caret-browsing", FALSE, \ "enable-developer-extras", TRUE, \ "enable-java", FALSE, \ - "enable-javascript", FALSE, \ + "enable-javascript", TRUE, \ + "enable-javascript-markup", FALSE, \ "enable-plugins", FALSE, \ "javascript-can-access-clipboard", FALSE, \ "javascript-can-open-windows-automatically", FALSE, \