From 1d8e5651dedf56470d10b94a0022942a91cde6cd Mon Sep 17 00:00:00 2001
From: KushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com>
Date: Mon, 16 Aug 2021 15:56:41 -0300
Subject: devchan why the hell did you use style attributes
---
client.go | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
(limited to 'client.go')
diff --git a/client.go b/client.go
index 85a327e..1be926a 100644
--- a/client.go
+++ b/client.go
@@ -216,7 +216,7 @@ func OutboxGet(w http.ResponseWriter, r *http.Request, db *sql.DB, collection Co
"parseReplyLink": func(actorId string, op string, id string, content string) template.HTML {
actor := FingerActor(actorId)
title := strings.ReplaceAll(ParseLinkTitle(actor.Id, op, content), `/\<`, ">")
- link := ">>" + shortURL(actor.Outbox, id) + ""
+ link := ">>" + shortURL(actor.Outbox, id) + ""
return template.HTML(link)
},
"add": func(i, j int) int {
@@ -403,7 +403,7 @@ func PostGet(w http.ResponseWriter, r *http.Request, db *sql.DB) {
"parseReplyLink": func(actorId string, op string, id string, content string) template.HTML {
actor := FingerActor(actorId)
title := strings.ReplaceAll(ParseLinkTitle(actor.Id, op, content), `/\<`, ">")
- link := ">>" + shortURL(actor.Outbox, id) + ""
+ link := ">>" + shortURL(actor.Outbox, id) + ""
return template.HTML(link)
},
"sub": func(i, j int) int { return i - j }}).ParseFiles("./static/main.html", "./static/npost.html", "./static/top.html", "./static/bottom.html", "./static/posts.html"))
@@ -886,17 +886,12 @@ func ParseLinkComments(db *sql.DB, board Actor, op string, content string, threa
}
}
- var style string
- if board.Restricted {
- style = "color: #af0a0f;"
- }
-
//replace link with quote format
replyID, isReply := IsReplyToOP(db, op, parsedLink)
if isReply {
id := shortURL(board.Outbox, replyID)
- content = strings.Replace(content, match[i][0], ">>"+id+""+isOP+"", -1)
+ content = strings.Replace(content, match[i][0], ">>"+id+""+isOP+"", -1)
} else {
@@ -909,7 +904,7 @@ func ParseLinkComments(db *sql.DB, board Actor, op string, content string, threa
}
if actor.Id != "" {
- content = strings.Replace(content, match[i][0], ">>"+shortURL(board.Outbox, parsedLink)+isOP+" →", -1)
+ content = strings.Replace(content, match[i][0], ">>"+shortURL(board.Outbox, parsedLink)+isOP+" →", -1)
}
}
}
--
cgit v1.2.3