From 83e072d6d5b248c416f89cb144e677b2a3bdaba9 Mon Sep 17 00:00:00 2001 From: Azure Date: Sun, 30 Jun 2019 12:15:22 -0400 Subject: Allow setting User Agent in Siteconf Since Google gives usable search results to Lynx but not to w3m, and many other sites block Lynx but /not/ w3m, we want to be able to set the User Agent string on a per-site basis. --- fm.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'fm.h') diff --git a/fm.h b/fm.h index 8face3c..4a17ecc 100644 --- a/fm.h +++ b/fm.h @@ -271,8 +271,10 @@ extern int REV_LB[]; #define SCONF_URL_CHARSET 2 #define SCONF_NO_REFERER_FROM 3 #define SCONF_NO_REFERER_TO 4 -#define SCONF_N_FIELD 5 +#define SCONF_USER_AGENT 5 +#define SCONF_N_FIELD 6 #define query_SCONF_SUBSTITUTE_URL(pu) ((const char *)querySiteconf(pu, SCONF_SUBSTITUTE_URL)) +#define query_SCONF_USER_AGENT(pu) ((const char *)querySiteconf(pu, SCONF_USER_AGENT)) #define query_SCONF_URL_CHARSET(pu) ((const wc_ces *)querySiteconf(pu, SCONF_URL_CHARSET)) #define query_SCONF_NO_REFERER_FROM(pu) ((const int *)querySiteconf(pu, SCONF_NO_REFERER_FROM)) #define query_SCONF_NO_REFERER_TO(pu) ((const int *)querySiteconf(pu, SCONF_NO_REFERER_TO)) -- cgit v1.2.3