diff options
author | Josh Rickmar <jrick@devio.us> | 2012-05-11 11:43:54 -0400 |
---|---|---|
committer | Josh Rickmar <jrick@devio.us> | 2012-05-11 15:35:14 -0400 |
commit | 9cc9be30cb6004404eccf206357498299a7baf53 (patch) | |
tree | 26c910311603b5b3481ce046fd1715bfdcb2d795 | |
parent | 503de15ac3fb268325e9a0ec2571b79e1f4da831 (diff) | |
download | xombrero-9cc9be30cb6004404eccf206357498299a7baf53.tar.gz |
Rename js_autorun_enabled to enable_js_autorun and document the usage in the manpage
-rw-r--r-- | settings.c | 4 | ||||
-rw-r--r-- | xxxterm.1 | 15 | ||||
-rw-r--r-- | xxxterm.c | 2 | ||||
-rw-r--r-- | xxxterm.h | 2 |
4 files changed, 19 insertions, 4 deletions
diff --git a/settings.c b/settings.c index 30749e6..ac305d0 100644 --- a/settings.c +++ b/settings.c @@ -91,7 +91,7 @@ char search_file[PATH_MAX]; char command_file[PATH_MAX]; char *encoding = NULL; int autofocus_onload = 0; -int js_autorun_enabled = 1; +int enable_js_autorun = 1; int edit_mode = XT_EM_HYBRID; int userstyle_global = 0; int auto_load_images = 1; @@ -356,7 +356,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 }, - { "js_autorun_enabled", XT_S_INT, 0, &js_autorun_enabled, NULL, NULL, NULL, NULL }, + { "enable_js_autorun", XT_S_INT, 0, &enable_js_autorun, NULL, NULL, NULL, NULL }, { "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 }, diff --git a/xxxterm.1 b/xxxterm.1 index 0aaaed9..9960831 100644 --- a/xxxterm.1 +++ b/xxxterm.1 @@ -1051,6 +1051,21 @@ When enabled (disabled by default) displays favicons at each tab. This setting only affects .Cm compact tabs. +.It Cm enable_js_autorun +Enables support for autorunning JavaScript after page loads. When +enabled, +.Pa ~/.xxxterm/js/ +will be searched for +.Pa default.js +and +.Pa host.domain.js . +If +.Pa host.domain.js +does not exist, +.Pa domain.js +will be tried instead. The content of the both default and +host/domain files are read and executed on each page load. +Default is 1. .It Cm enable_js_whitelist When enabled all domains must be in the js whitelist in order to run Java Script. diff --git a/xxxterm.c b/xxxterm.c index 5931aae..4455743 100644 --- a/xxxterm.c +++ b/xxxterm.c @@ -4060,7 +4060,7 @@ js_autorun(struct tab *t) char *js = NULL, *jsat, *domain = NULL; FILE *deffile = NULL, *hostfile = NULL; - if (js_autorun_enabled == 0) + if (enable_js_autorun == 0) return; uri = get_uri(t); diff --git a/xxxterm.h b/xxxterm.h index a73f2ab..d04bc79 100644 --- a/xxxterm.h +++ b/xxxterm.h @@ -663,7 +663,7 @@ extern char search_file[PATH_MAX]; extern char command_file[PATH_MAX]; extern char *encoding; extern int autofocus_onload; -extern int js_autorun_enabled; +extern int enable_js_autorun; extern char *cmd_font_name; extern char *oops_font_name; extern char *statusbar_font_name; |