diff options
author | Josh Rickmar <jrick@devio.us> | 2012-05-14 09:30:52 -0400 |
---|---|---|
committer | Josh Rickmar <jrick@devio.us> | 2012-05-15 11:53:30 -0400 |
commit | bb9c9873390717382741d28cb591fc192d71e8cf (patch) | |
tree | bb79c8c92088da49c67d1a7638ea0a9f3d705472 | |
parent | 298d4dd6df9f5b814310fcbd763de3edce606139 (diff) | |
download | xombrero-bb9c9873390717382741d28cb591fc192d71e8cf.tar.gz |
Make enable_js_autorun a runtime setting. Missed this one before as
it wasn't mentioned in the manpage.
-rw-r--r-- | settings.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/settings.c b/settings.c index ac305d0..8dd29fc 100644 --- a/settings.c +++ b/settings.c @@ -136,6 +136,7 @@ int set_default_script(struct settings *, char *); int set_default_script_rt(char *); int set_default_zoom_level(char *); int set_enable_cookie_whitelist(char *); +int set_enable_js_autorun(char *); int set_enable_js_whitelist(char *); int set_enable_localstorage(char *); int set_enable_plugins(char *); @@ -356,7 +357,7 @@ struct settings rs[] = { { "history_autosave", XT_S_INT, 0, &history_autosave, NULL, NULL, NULL, NULL }, { "http_proxy", XT_S_STR, 0, NULL, &http_proxy, NULL, NULL, set_http_proxy }, { "icon_size", XT_S_INT, 0, &icon_size, NULL, NULL, NULL, NULL }, - { "enable_js_autorun", XT_S_INT, 0, &enable_js_autorun, NULL, NULL, NULL, NULL }, + { "enable_js_autorun", XT_S_INT, 0, &enable_js_autorun, NULL, NULL, NULL, set_enable_js_autorun }, { "max_connections", XT_S_INT, XT_SF_RESTART,&max_connections, NULL, NULL, NULL, NULL }, { "max_host_connections", XT_S_INT, XT_SF_RESTART,&max_host_connections, NULL, NULL, NULL, NULL }, { "read_only_cookies", XT_S_INT, 0, &read_only_cookies, NULL, NULL, NULL, set_read_only_cookies }, @@ -1334,6 +1335,19 @@ set_enable_cookie_whitelist(char *value) } int +set_enable_js_autorun(char *value) +{ + int tmp; + const char *errstr; + + tmp = strtonum(value, 0, 1, &errstr); + if (errstr) + return (-1); + enable_js_autorun = tmp; + return (0); +} + +int set_enable_js_whitelist(char *value) { int tmp; |