From f9f4ed51dbed4e1b49aac0389c6a83eb73ce6519 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Thu, 31 Aug 2023 19:11:28 +0200 Subject: [PATCH] Make layout smaller --- main.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/main.go b/main.go index 7ad88cf..85de4ff 100644 --- a/main.go +++ b/main.go @@ -108,26 +108,28 @@ func main() { comment := "**Twitter2Nitter**\n\nClearnet:\n\n" for _, nUrl := range NitterClearnetUrls { nitterLink := strings.Replace(item.Url, m[1], nUrl, 1) - comment += fmt.Sprintf("- [%s](%s)\n", nUrl, nitterLink) + comment += fmt.Sprintf("[%s](%s) | ", nUrl, nitterLink) } comment = strings.TrimRight(comment, "| ") comment += "\n\nTor:\n\n" for _, nUrl := range NitterOnionUrls { nitterLink := strings.Replace(item.Url, m[1], nUrl, 1) nitterLink = strings.Replace(nitterLink, "https://", "http://", 1) - comment += fmt.Sprintf("- [%s](%s)\n", nUrl, nitterLink) + comment += fmt.Sprintf("[%s..%s](%s) | ", nUrl[:12], nUrl[len(nUrl)-12:], nitterLink) } - comment += "\nI2P:\n\n" + comment = strings.TrimRight(comment, "| ") + comment += "\n\nI2P:\n\n" for _, nUrl := range NitterI2PUrls { nitterLink := strings.Replace(item.Url, m[1], nUrl, 1) nitterLink = strings.Replace(nitterLink, "https://", "http://", 1) - comment += fmt.Sprintf("- [%s](%s)\n", nUrl, nitterLink) + comment += fmt.Sprintf("[%s..%s](%s) | ", nUrl[:12], nUrl[len(nUrl)-12:], nitterLink) } - comment += "\nLokinet:\n\n" + comment = strings.TrimRight(comment, "| ") + comment += "\n\nLokinet:\n\n" for _, nUrl := range NitterLokinetUrls { nitterLink := strings.Replace(item.Url, m[1], nUrl, 1) nitterLink = strings.Replace(nitterLink, "https://", "http://", 1) - comment += fmt.Sprintf("- [%s](%s)\n", nUrl, nitterLink) + comment += fmt.Sprintf("[%s](%s)\n", nUrl, nitterLink) } comment += "\n\n_Nitter is a free and open source alternative Twitter front-end focused on privacy and performance. " comment += "Click [here](https://github.com/zedeus/nitter) for more information._"