From 361f329fa700c34021ceed88f34d57cc7ab5c7be Mon Sep 17 00:00:00 2001 From: rafa_99 Date: Sat, 25 Sep 2021 01:32:23 +0100 Subject: Toggleable JavaScript in Configs --- src/config.def.h | 3 +++ src/setting.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/config.def.h b/src/config.def.h index e4d27af..70a45b9 100644 --- a/src/config.def.h +++ b/src/config.def.h @@ -88,3 +88,6 @@ /* Geolocation - always/ask/never */ #define SETTING_GEOLOCATION_ACCEPT "never" + +/* JavaScript */ +#define SETTING_JAVASCRIPT_ACCEPT on diff --git a/src/setting.c b/src/setting.c index 8ed5d0b..4e42499 100644 --- a/src/setting.c +++ b/src/setting.c @@ -127,7 +127,7 @@ void setting_init(Client *c) setting_add(c, "prevent-newwindow", TYPE_BOOLEAN, &off, internal, 0, &c->config.prevent_newwindow); setting_add(c, "print-backgrounds", TYPE_BOOLEAN, &on, webkit, 0, "print-backgrounds"); setting_add(c, "sans-serif-font", TYPE_CHAR, &"sans-serif", webkit, 0, "sans-serif-font-family"); - setting_add(c, "scripts", TYPE_BOOLEAN, &on, webkit, 0, "enable-javascript"); + setting_add(c, "scripts", TYPE_BOOLEAN, &SETTING_JAVASCRIPT_ACCEPT, webkit, 0, "enable-javascript"); setting_add(c, "serif-font", TYPE_CHAR, &"serif", webkit, 0, "serif-font-family"); setting_add(c, "site-specific-quirks", TYPE_BOOLEAN, &off, webkit, 0, "enable-site-specific-quirks"); setting_add(c, "smooth-scrolling", TYPE_BOOLEAN, &off, webkit, 0, "enable-smooth-scrolling"); -- cgit v1.2.3