diff --git a/gen_router.go b/gen_router.go index b558c443..336f1bfb 100644 --- a/gen_router.go +++ b/gen_router.go @@ -509,14 +509,15 @@ var agentMapEnum = map[string]int{ "cloudflare": 21, "uptimebot": 22, "slackbot": 23, - "discourse": 24, - "lynx": 25, - "blank": 26, - "malformed": 27, - "suspicious": 28, - "semrush": 29, - "dotbot": 30, - "zgrab": 31, + "apple": 24, + "discourse": 25, + "lynx": 26, + "blank": 27, + "malformed": 28, + "suspicious": 29, + "semrush": 30, + "dotbot": 31, + "zgrab": 32, } var reverseAgentMapEnum = map[int]string{ 0: "unknown", @@ -543,14 +544,15 @@ var reverseAgentMapEnum = map[int]string{ 21: "cloudflare", 22: "uptimebot", 23: "slackbot", - 24: "discourse", - 25: "lynx", - 26: "blank", - 27: "malformed", - 28: "suspicious", - 29: "semrush", - 30: "dotbot", - 31: "zgrab", + 24: "apple", + 25: "discourse", + 26: "lynx", + 27: "blank", + 28: "malformed", + 29: "suspicious", + 30: "semrush", + 31: "dotbot", + 32: "zgrab", } var markToAgent = map[string]string{ "OPR": "opera", @@ -577,6 +579,7 @@ var markToAgent = map[string]string{ "Twitterbot": "twitter", "facebookexternalhit": "facebook", "Facebot": "facebook", + "Applebot": "apple", "Discourse": "discourse", "SemrushBot": "semrush", "DotBot": "dotbot", @@ -705,7 +708,7 @@ func (r *GenRouter) SuspiciousRequest(req *http.Request, prepend string) { prepend += "\n" } r.DumpRequest(req,prepend+"Suspicious Request") - counters.AgentViewCounter.Bump(28) + counters.AgentViewCounter.Bump(29) } func isLocalHost(host string) bool { @@ -720,7 +723,7 @@ func (r *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) { w.WriteHeader(200) // 400 w.Write([]byte("")) r.DumpRequest(req,"Malformed Request T"+strconv.Itoa(typ)) - counters.AgentViewCounter.Bump(27) + counters.AgentViewCounter.Bump(28) } // Split the Host and Port string @@ -844,7 +847,7 @@ func (r *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) { ua := strings.TrimSpace(strings.Replace(strings.TrimPrefix(req.UserAgent(),"Mozilla/5.0 ")," Safari/537.36","",-1)) // Noise, no one's going to be running this and it would require some sort of agent ranking system to determine which identifier should be prioritised over another var agent string if ua == "" { - counters.AgentViewCounter.Bump(26) + counters.AgentViewCounter.Bump(27) if c.Dev.DebugMode { var prepend string for _, char := range req.UserAgent() { diff --git a/langs/english.json b/langs/english.json index a446b242..93d68596 100644 --- a/langs/english.json +++ b/langs/english.json @@ -193,6 +193,8 @@ "cloudflare":"Cloudflare Alwayson", "uptimebot":"Uptimebot", "slackbot":"Slackbot", + "facebook":"FacebookBot", + "apple":"AppleBot", "discourse":"Discourse Forum Onebox", "lynx":"Lynx", @@ -588,6 +590,7 @@ "forums_none":"None", "forums_no_forums":"You don't have access to any forums.", + "topic.topic_info_aria":"Topic information", "topic.opening_post_aria":"The opening post for this topic", "topic.status_closed_aria":"This topic is locked", "topic.title_input_aria":"Topic Title Input", diff --git a/router_gen/main.go b/router_gen/main.go index c83c82f2..836afa22 100644 --- a/router_gen/main.go +++ b/router_gen/main.go @@ -225,6 +225,7 @@ func main() { "cloudflare", "uptimebot", "slackbot", + "apple", "discourse", "lynx", "blank", @@ -266,6 +267,7 @@ func main() { "Twitterbot", "facebookexternalhit", "Facebot", + "Applebot", "Discourse", "SemrushBot", @@ -299,6 +301,7 @@ func main() { "Twitterbot": "twitter", "facebookexternalhit": "facebook", "Facebot": "facebook", + "Applebot":"apple", "Discourse": "discourse", "SemrushBot": "semrush", diff --git a/templates/topic.html b/templates/topic.html index d7d470c5..104242c0 100644 --- a/templates/topic.html +++ b/templates/topic.html @@ -12,7 +12,7 @@ -
+

{{.Topic.Title}}

{{if .Topic.IsClosed}}🔒︎{{end}} diff --git a/templates/topic_alt.html b/templates/topic_alt.html index 7d47030a..e9fb89c7 100644 --- a/templates/topic_alt.html +++ b/templates/topic_alt.html @@ -7,7 +7,7 @@ -
+

{{.Topic.Title}}

- @@ -29,8 +29,7 @@
- {{if .Poll.ID}} -
+ {{if .Poll.ID}}
{{template "topic_alt_userinfo.html" .Topic }}