Compare commits

..

4 Commits

Author SHA1 Message Date
httpjamesm 81c4568564 feat: process HTML on comment text 2024-03-09 12:05:00 -05:00
httpjamesm 9d77743865 feat: run stack overflow link replacer on process 2024-03-09 12:00:49 -05:00
httpjamesm 5ec826a160 fix: replace stackoverflow.com links with path 2024-03-09 11:55:02 -05:00
httpjamesm 596ffaa02a feat: replace stackoverflow and exchange links 2024-03-09 11:51:59 -05:00
6 changed files with 3 additions and 18 deletions
-1
View File
@@ -38,7 +38,6 @@ This project is super lightweight by design. The UI is simple and the frontend i
| [exchange.seitan-ayoub.lol](https://exchange.seitan-ayoub.lol) | Germany | Operated by [Seitan Ayoub](https://seitan-ayoub.lol) |
| [overflow.r4fo.com](https://overflow.r4fo.com) | The Netherlands | Operated by [r4fo.com](https://r4fo.com) |
| [overflow.ducks.party](https://overflow.ducks.party) | The Netherlands | Operated by [ducks.party](https://ducks.party) |
| [ao.ngn.tf](https://ao.ngn.tf) | Turkey | Operated by [ngn](https://ngn.tf) |
## Other Instances
+1 -1
View File
@@ -1,3 +1,3 @@
package config
var Version = "1.11.0"
var Version = "1.10.1"
-1
View File
@@ -52,7 +52,6 @@ func main() {
r.GET("/a/:id", routes.RedirectShortenedOverflowURL)
r.GET("/q/:id", routes.RedirectShortenedOverflowURL)
r.GET("/q/:id/:answerId", routes.RedirectShortenedOverflowURL)
r.GET("/questions/:id", func(c *gin.Context) {
// redirect user to the question with the title
-12
View File
@@ -50,15 +50,3 @@ html {
details {
cursor: pointer;
}
.d-flex {
display: flex;
}
.fd-column {
flex-direction: column;
}
.fw-nowrap {
flex-wrap: nowrap;
}
+1 -1
View File
@@ -109,7 +109,7 @@ func ViewQuestion(c *gin.Context) {
"answers": answers,
"imagePolicy": imagePolicy,
"theme": c.MustGet("theme").(string),
"currentUrl": fmt.Sprintf("%s%s", os.Getenv("APP_URL"), c.Request.URL.Path),
"currentUrl": fmt.Sprintf("%s/questions/%s/%s", os.Getenv("APP_URL"), questionId, params.QuestionTitle),
"sortValue": params.SoSortValue,
"domain": domain,
})
+1 -2
View File
@@ -11,7 +11,6 @@ import (
func RedirectShortenedOverflowURL(c *gin.Context) {
id := c.Param("id")
answerId := c.Param("answerId")
// fetch the stack overflow URL
client := resty.New()
@@ -21,7 +20,7 @@ func RedirectShortenedOverflowURL(c *gin.Context) {
}),
)
resp, err := client.R().Get(fmt.Sprintf("https://www.stackoverflow.com/a/%s/%s", id, answerId))
resp, err := client.R().Get(fmt.Sprintf("https://www.stackoverflow.com/a/%s", id))
if err != nil {
c.HTML(400, "home.html", gin.H{
"errorMessage": "Unable to fetch stack overflow URL",