1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Add a boolean option ecmascript.ignore_noscript, default off,

that when enabled causes ELinks to ignore any content enclosed
with <noscript> tags.
This commit is contained in:
Miciah Dashiel Butler Masters 2005-10-23 21:59:05 +00:00 committed by Miciah Dashiel Butler Masters
parent e31a66745a
commit 82c4d457d6
2 changed files with 8 additions and 3 deletions

View File

@ -805,9 +805,9 @@ html_noscript(struct html_context *html_context, unsigned char *a)
{
/* We shouldn't throw <noscript> away until our ECMAScript support is
* halfway decent. */
#if 0
// #ifdef CONFIG_ECMASCRIPT
if (get_opt_bool("ecmascript.enable"))
#ifdef CONFIG_ECMASCRIPT
if (get_opt_bool("ecmascript.enable")
&& get_opt_bool("ecmascript.ignore_noscript"))
html_skip(html_context, a);
#endif
}

View File

@ -46,6 +46,11 @@ static struct option_info ecmascript_options[] = {
"error_reporting", 0, 0,
N_("Open a message box when a script reports an error.")),
INIT_OPT_BOOL("ecmascript", N_("Ignore <noscript> content"),
"ignore_noscript", 0, 0,
N_("Whether to ignore content enclosed by the <noscript> tag\n"
" when ECMAScript is enabled.")),
INIT_OPT_INT("ecmascript", N_("Maximum execution time"),
"max_exec_time", 0, 1, 3600, 5,
N_("Maximum execution time in seconds for a script.")),