fixed favicon backend not really workin
This commit is contained in:
parent
72cbfbab10
commit
4a0738745a
4 changed files with 43 additions and 20 deletions
11
text.go
11
text.go
|
@ -56,6 +56,7 @@ func HandleTextSearch(w http.ResponseWriter, settings UserSettings, query string
|
|||
type DecoratedResult struct {
|
||||
TextSearchResult
|
||||
FaviconURL string
|
||||
FaviconID string
|
||||
PrettyLink LinkParts
|
||||
}
|
||||
|
||||
|
@ -65,10 +66,16 @@ func HandleTextSearch(w http.ResponseWriter, settings UserSettings, query string
|
|||
continue
|
||||
}
|
||||
|
||||
// First format the link
|
||||
prettyLink := FormatLinkHTML(r.URL)
|
||||
faviconID := faviconIDFromURL(r.URL)
|
||||
faviconURL := getFaviconProxyURL("", r.URL) //string(prettyLink.Domain)
|
||||
|
||||
decoratedResults = append(decoratedResults, DecoratedResult{
|
||||
TextSearchResult: r,
|
||||
FaviconURL: getFaviconProxyURL("", r.URL),
|
||||
PrettyLink: FormatLinkHTML(r.URL),
|
||||
PrettyLink: prettyLink,
|
||||
FaviconID: faviconID,
|
||||
FaviconURL: faviconURL,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue