aboutsummaryrefslogtreecommitdiffstats
path: root/fm.h
diff options
context:
space:
mode:
authorAzure <azure@fox.blue>2019-06-30 16:15:22 +0000
committerAzure <azure@fox.blue>2019-06-30 16:15:22 +0000
commit83e072d6d5b248c416f89cb144e677b2a3bdaba9 (patch)
treece5478bd6a172d5e32cc3a68e2e5a748407ff05a /fm.h
parentUpdate ChangeLog (diff)
downloadw3m-83e072d6d5b248c416f89cb144e677b2a3bdaba9.tar.gz
w3m-83e072d6d5b248c416f89cb144e677b2a3bdaba9.zip
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.
Diffstat (limited to 'fm.h')
-rw-r--r--fm.h4
1 files changed, 3 insertions, 1 deletions
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))