From 46767f6bf0dcc236884505944a7efd21d4f950f1 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Fri, 2 Jan 2015 14:53:18 +0100 Subject: [PATCH] Introduced the document.browse.show_refresh_link option. Whether to show Refresh: link line. Default 1. --- src/config/options.inc | 4 ++++ src/document/html/parser.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/config/options.inc b/src/config/options.inc index 221107fb9..722ed2096 100644 --- a/src/config/options.inc +++ b/src/config/options.inc @@ -475,6 +475,10 @@ static union option_info config_options_info[] = { "is used unchanged. It can fix going back in history for some " "sites that use refreshing with zero values.")), + INIT_OPT_BOOL("document.browse", N_("Show meta refresh link"), + "show_refresh_link", 0, 1, + N_("Whether to show meta refresh link.")), + INIT_OPT_BOOL("document.browse", N_("Tables navigation order"), "table_move_order", 0, 0, N_("Move by columns in table, instead of rows.")), diff --git a/src/document/html/parser.c b/src/document/html/parser.c index 332b5279b..c99d6be03 100644 --- a/src/document/html/parser.c +++ b/src/document/html/parser.c @@ -307,8 +307,10 @@ check_head_for_refresh(struct html_context *html_context, unsigned char *head) html_focusable(html_context, NULL); - put_link_line("Refresh: ", url, joined_url, - html_context->options->framename, html_context); + if (get_opt_bool("document.browse.show_refresh_link", NULL)) { + put_link_line("Refresh: ", url, joined_url, + html_context->options->framename, html_context); + } html_context->special_f(html_context, SP_REFRESH, seconds, joined_url); }