~ols/yeet

8947d939d99623a75824c1bea4ec474651a1237d — Oliver Leaver-Smith 2 years ago 4c8c3b3
a bit more de-honking
3 files changed, 11 insertions(+), 11 deletions(-)

M views/honk.html
M views/honkpage.js
M web.go
M views/honk.html => views/honk.html +1 -1
@@ 47,7 47,7 @@ in reply to: <a href="{{ .RID }}" rel=noreferrer>{{ .RID }}</a>
{{ end }}
<br>
{{ if $bonkcsrf }}
<span style="margin-left: 1em;" class="clip">convoy: <a class="convoylink" href="/t?c={{ .Convoy }}">{{ .Convoy }}</a></span>
<span style="margin-left: 1em;" class="clip">thread: <a class="convoylink" href="/t?c={{ .Convoy }}">{{ .Convoy }}</a></span>
{{ end }}
</header>
<p>

M views/honkpage.js => views/honkpage.js +3 -3
@@ 20,13 20,13 @@ function get(url, whendone) {
	x.send()
}
function bonk(el, xid) {
	el.innerHTML = "bonked"
	el.innerHTML = "boosted"
	el.disabled = true
	post("/bonk", encode({"js": "2", "CSRF": csrftoken, "xid": xid}))
	return false
}
function unbonk(el, xid) {
	el.innerHTML = "unbonked"
	el.innerHTML = "unboosted"
	el.disabled = true
	post("/zonkit", encode({"CSRF": csrftoken, "wherefore": "unbonk", "what": xid}))
}


@@ 43,7 43,7 @@ function muteit(el, convoy) {
	}
}
function zonkit(el, xid) {
	el.innerHTML = "zonked"
	el.innerHTML = "deleted"
	el.disabled = true
	post("/zonkit", encode({"CSRF": csrftoken, "wherefore": "zonk", "what": xid}))
	var p = el

M web.go => web.go +7 -7
@@ 113,7 113,7 @@ func homepage(w http.ResponseWriter, r *http.Request) {
		userid = u.UserID
		switch r.URL.Path {
		case "/atme":
			templinfo["ServerMessage"] = "at me!"
			templinfo["ServerMessage"] = "mentions"
			templinfo["PageName"] = "atme"
			honks = gethonksforme(userid, 0)
			honks = osmosis(honks, userid, false)


@@ 132,7 132,7 @@ func homepage(w http.ResponseWriter, r *http.Request) {
			honks = gethonksforuserfirstclass(userid, 0)
			honks = osmosis(honks, userid, true)
		case "/saved":
			templinfo["ServerMessage"] = "saved honks"
			templinfo["ServerMessage"] = "saved posts"
			templinfo["PageName"] = "saved"
			honks = getsavedhonks(userid, 0)
		default:


@@ 773,7 773,7 @@ func showconvoy(w http.ResponseWriter, r *http.Request) {
	reversehonks(honks)
	templinfo["PageName"] = "convoy"
	templinfo["PageArg"] = c
	templinfo["ServerMessage"] = "honks in convoy: " + c
	templinfo["ServerMessage"] = "posts in thread: " + c
	templinfo["HonkCSRF"] = login.GetCSRF("honkhonk", r)
	honkpage(w, u, honks, templinfo)
}


@@ 2198,7 2198,7 @@ func webhydra(w http.ResponseWriter, r *http.Request) {
	case "atme":
		honks = gethonksforme(userid, wanted)
		honks = osmosis(honks, userid, false)
		templinfo["ServerMessage"] = "at me!"
		templinfo["ServerMessage"] = "mentions"
	case "longago":
		honks = gethonksfromlongago(userid, wanted)
		honks = osmosis(honks, userid, false)


@@ 2214,17 2214,17 @@ func webhydra(w http.ResponseWriter, r *http.Request) {
	case "saved":
		honks = getsavedhonks(userid, wanted)
		templinfo["PageName"] = "saved"
		templinfo["ServerMessage"] = "saved honks"
		templinfo["ServerMessage"] = "saved posts"
	case "combo":
		c := r.FormValue("c")
		honks = gethonksbycombo(userid, c, wanted)
		honks = osmosis(honks, userid, false)
		templinfo["ServerMessage"] = "honks by combo: " + c
		templinfo["ServerMessage"] = "posts by combo: " + c
	case "convoy":
		c := r.FormValue("c")
		honks = gethonksbyconvoy(userid, c, wanted)
		honks = osmosis(honks, userid, false)
		templinfo["ServerMessage"] = "honks in convoy: " + c
		templinfo["ServerMessage"] = "posts in thread: " + c
	case "honker":
		xid := r.FormValue("xid")
		honks = gethonksbyxonker(userid, xid, wanted)