make quote inlining an option
This commit is contained in:
parent
455989f85b
commit
a45e27038f
|
@ -778,7 +778,9 @@ func xonksaver(user *WhatAbout, item junk.Junk, origin string) *Honk {
|
||||||
content += fmt.Sprintf(`<p><a href="%s">%s</a>`, url, url)
|
content += fmt.Sprintf(`<p><a href="%s">%s</a>`, url, url)
|
||||||
url = xid
|
url = xid
|
||||||
}
|
}
|
||||||
|
if user.Options.InlineQuotes {
|
||||||
content = qutify(user, content)
|
content = qutify(user, content)
|
||||||
|
}
|
||||||
rid, ok = obj.GetString("inReplyTo")
|
rid, ok = obj.GetString("inReplyTo")
|
||||||
if !ok {
|
if !ok {
|
||||||
if robj, ok := obj.GetMap("inReplyTo"); ok {
|
if robj, ok := obj.GetMap("inReplyTo"); ok {
|
||||||
|
|
1
honk.go
1
honk.go
|
@ -54,6 +54,7 @@ type UserOptions struct {
|
||||||
SkinnyCSS bool `json:",omitempty"`
|
SkinnyCSS bool `json:",omitempty"`
|
||||||
OmitImages bool `json:",omitempty"`
|
OmitImages bool `json:",omitempty"`
|
||||||
MentionAll bool `json:",omitempty"`
|
MentionAll bool `json:",omitempty"`
|
||||||
|
InlineQuotes bool `json:",omitempty"`
|
||||||
Avatar string `json:",omitempty"`
|
Avatar string `json:",omitempty"`
|
||||||
Banner string `json:",omitempty"`
|
Banner string `json:",omitempty"`
|
||||||
MapLink string `json:",omitempty"`
|
MapLink string `json:",omitempty"`
|
||||||
|
|
|
@ -14,7 +14,8 @@
|
||||||
<input tabindex=1 type="checkbox" id="omitimages" name="omitimages" value="omitimages" {{ if .User.Options.OmitImages }}checked{{ end }}><span></span>
|
<input tabindex=1 type="checkbox" id="omitimages" name="omitimages" value="omitimages" {{ if .User.Options.OmitImages }}checked{{ end }}><span></span>
|
||||||
<p><label class="button" for="mentionall">mention all:</label>
|
<p><label class="button" for="mentionall">mention all:</label>
|
||||||
<input tabindex=1 type="checkbox" id="mentionall" name="mentionall" value="mentionall" {{ if .User.Options.MentionAll }}checked{{ end }}><span></span>
|
<input tabindex=1 type="checkbox" id="mentionall" name="mentionall" value="mentionall" {{ if .User.Options.MentionAll }}checked{{ end }}><span></span>
|
||||||
|
<p><label class="button" for="inlineqts">inline quotes:</label>
|
||||||
|
<input tabindex=1 type="checkbox" id="inlineqts" name="inlineqts" value="inlineqts" {{ if .User.Options.InlineQuotes }}checked{{ end }}><span></span>
|
||||||
<p><label class="button" for="maps">apple map links:</label>
|
<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>
|
<input tabindex=1 type="checkbox" id="maps" name="maps" value="apple" {{ if eq "apple" .User.Options.MapLink }}checked{{ end }}><span></span>
|
||||||
<p><label class="button" for="reaction">reaction:</label>
|
<p><label class="button" for="reaction">reaction:</label>
|
||||||
|
|
5
web.go
5
web.go
|
@ -1134,6 +1134,11 @@ func saveuser(w http.ResponseWriter, r *http.Request) {
|
||||||
} else {
|
} else {
|
||||||
options.MentionAll = false
|
options.MentionAll = false
|
||||||
}
|
}
|
||||||
|
if r.FormValue("inlineqts") == "inlineqts" {
|
||||||
|
options.InlineQuotes = true
|
||||||
|
} else {
|
||||||
|
options.InlineQuotes = false
|
||||||
|
}
|
||||||
if r.FormValue("maps") == "apple" {
|
if r.FormValue("maps") == "apple" {
|
||||||
options.MapLink = "apple"
|
options.MapLink = "apple"
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue