From 7e2a8c0457b797e9cdc4788b0ee6c39cfabcb31d Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Thu, 16 Jan 2020 21:42:48 -0500 Subject: [PATCH] quick fix to hide all images --- docs/changelog.txt | 2 ++ honk.go | 1 + views/account.html | 2 ++ web.go | 13 +++++++++++-- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/changelog.txt b/docs/changelog.txt index 9830350..069555b 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -2,6 +2,8 @@ changelog === next ++ Quick fix to hide all images. + + Allow resending follow requests. + Improved search query parsing. diff --git a/honk.go b/honk.go index ef096ab..96f5bb5 100644 --- a/honk.go +++ b/honk.go @@ -47,6 +47,7 @@ type WhatAbout struct { type UserOptions struct { SkinnyCSS bool `json:",omitempty"` + OmitImages bool `json:",omitempty"` Avatar string `json:",omitempty"` MapLink string `json:",omitempty"` } diff --git a/views/account.html b/views/account.html index dc2f957..e7d7974 100644 --- a/views/account.html +++ b/views/account.html @@ -10,6 +10,8 @@

+

+

diff --git a/web.go b/web.go index 7a63615..f9c8a9e 100644 --- a/web.go +++ b/web.go @@ -55,10 +55,14 @@ func getuserstyle(u *login.UserInfo) template.CSS { return "" } user, _ := butwhatabout(u.Username) + css := template.CSS("") if user.Options.SkinnyCSS { - return "main { max-width: 700px; }" + css += "main { max-width: 700px; }\n" } - return "" + if user.Options.OmitImages { + css += ".honk .noise img { display: none; }\n" + } + return css } func getmaplink(u *login.UserInfo) string { @@ -1118,6 +1122,11 @@ func saveuser(w http.ResponseWriter, r *http.Request) { } else { options.SkinnyCSS = false } + if r.FormValue("omitimages") == "omitimages" { + options.OmitImages = true + } else { + options.OmitImages = false + } if r.FormValue("maps") == "apple" { options.MapLink = "apple" } else {