diff options
-rw-r--r-- | doc/neovimb.1 | 18 | ||||
-rw-r--r-- | src/main.c | 12 | ||||
-rw-r--r-- | src/main.h | 1 | ||||
-rw-r--r-- | src/setting.c | 1 |
4 files changed, 26 insertions, 6 deletions
diff --git a/doc/neovimb.1 b/doc/neovimb.1 index bba06e3..4ea7277 100644 --- a/doc/neovimb.1 +++ b/doc/neovimb.1 @@ -1353,6 +1353,12 @@ Whether JavaScript can access the clipboard. .B javascript-can-open-windows-automatically (bool) Whether JavaScript can open popup windows automatically without user interaction. +.PD +.RE +.TP +.B javascript-enable-markup (bool) +Whether JavaScript markup is enabled. +Disabling can help with some older systems (ppc, ppc64, etc.) that don't have complete JavaScript support to run webpages without crashing. .TP .B geolocation (string) Controls website access to the geolocation API {`always', `never', `ask' (display a prompt each time)} @@ -1457,6 +1463,12 @@ Brazil. .TP .B status-bar (bool) Indicates if the status bar should be shown. +.PD +.RE +.TP +.B status-bar-show-settings (bool) +Whether to show settings on the status bar. +This shows on the right hand of the status bar whether JavaScript, Cookies, and HTML5 LocalStorage are enabled. .TP .B status-css (string) CSS style applied to the status bar on none https pages. @@ -1521,12 +1533,6 @@ This fills the inputbox with the prefilled download command and replaces Whether to enable the XSS auditor. This feature filters some kinds of reflective XSS attacks on vulnerable web sites. -.PD -.RE -.TP -.B javascript-enable-markup (bool) -Whether JavaScript markup is enabled. -Disabling can help with some older systems (ppc, ppc64, etc.) that don't have complete JavaScript support to run webpages without crashing. . . .SH FILES @@ -640,6 +640,18 @@ void vb_statusbar_update(Client *c) c->state.scroll_percent = * (guint16*) ( &c->state.scroll_percent ); #endif + if ( c->config.statusbar_show_settings ) { + /* show js, cookies, and local storage status */ + + Setting *js = g_hash_table_lookup(c->config.settings, "scripts"); + Setting *cookies = g_hash_table_lookup(c->config.settings, "cookie-accept"); + Setting *local_storage = g_hash_table_lookup(c->config.settings, "html5-local-storage"); + + g_string_append_printf(status, " js: %s |", js->value.b ? "on" : "off"); + g_string_append_printf(status, " cookies: %s |", cookies->value.s); + g_string_append_printf(status, " storage: %s", local_storage->value.b ? "on" : "off"); + } + /* show the scroll status */ if (c->state.scroll_max == 0) { g_string_append(status, " All"); @@ -250,6 +250,7 @@ struct Client { gboolean prevent_newwindow; guint default_zoom; /* default zoom level in percent */ Shortcut *shortcuts; + gboolean statusbar_show_settings; } config; struct { GSList *list; diff --git a/src/setting.c b/src/setting.c index 4e42499..b347e9b 100644 --- a/src/setting.c +++ b/src/setting.c @@ -148,6 +148,7 @@ void setting_init(Client *c) setting_add(c, "scroll-multiplier", TYPE_INTEGER, &i, internal, 0, &c->config.scrollmultiplier); setting_add(c, "home-page", TYPE_CHAR, &SETTING_HOME_PAGE, NULL, 0, NULL); i = 2000; + setting_add(c, "status-bar-show-settings", TYPE_BOOLEAN, &off, internal, 0, &c->config.statusbar_show_settings); /* TODO should be global and not overwritten by a new client */ setting_add(c, "editor-command", TYPE_CHAR, &"x-terminal-emulator -e -vi '%s'", NULL, 0, NULL); setting_add(c, "strict-ssl", TYPE_BOOLEAN, &on, tls_policy, 0, NULL); |