quick fix to hide all images
Ted Unangst tedu@tedunangst.com
Thu, 16 Jan 2020 21:42:48 -0500
4 files changed,
16 insertions(+),
2 deletions(-)
M
docs/changelog.txt
→
docs/changelog.txt
@@ -2,6 +2,8 @@ changelog
=== next ++ Quick fix to hide all images. + + Allow resending follow requests. + Improved search query parsing.
M
views/account.html
→
views/account.html
@@ -10,6 +10,8 @@ <p>about me:
<p><textarea name="whatabout">{{ .WhatAbout }}</textarea> <p><label class="button" for="skinny">skinny layout:</label> <input tabindex=1 type="checkbox" id="skinny" name="skinny" value="skinny" {{ if .User.Options.SkinnyCSS }}checked{{ end }}><span></span> +<p><label class="button" for="omitimages">omit images:</label> +<input tabindex=1 type="checkbox" id="omitimages" name="omitimages" value="omitimages" {{ if .User.Options.OmitImages }}checked{{ end }}><span></span> <p><label class="button" for="maps">apple map links:</label> <input tabindex=1 type="checkbox" id="maps" name="maps" value="apple" {{ if eq "apple" .User.Options.MapLink }}checked{{ end }}><span></span> <p><button>update settings</button>
M
web.go
→
web.go
@@ -55,10 +55,14 @@ if u == nil {
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 {@@ -1117,6 +1121,11 @@ if r.FormValue("skinny") == "skinny" {
options.SkinnyCSS = true } else { options.SkinnyCSS = false + } + if r.FormValue("omitimages") == "omitimages" { + options.OmitImages = true + } else { + options.OmitImages = false } if r.FormValue("maps") == "apple" { options.MapLink = "apple"