record starting page name
This commit is contained in:
parent
ed7e687370
commit
2cb07e026a
2
honk.go
2
honk.go
|
@ -169,8 +169,10 @@ func homepage(w http.ResponseWriter, r *http.Request) {
|
||||||
} else {
|
} else {
|
||||||
userid = u.UserID
|
userid = u.UserID
|
||||||
if r.URL.Path == "/atme" {
|
if r.URL.Path == "/atme" {
|
||||||
|
templinfo["PageName"] = "atme"
|
||||||
honks = gethonksforme(userid)
|
honks = gethonksforme(userid)
|
||||||
} else {
|
} else {
|
||||||
|
templinfo["PageName"] = "home"
|
||||||
honks = gethonksforuser(userid)
|
honks = gethonksforuser(userid)
|
||||||
honks = osmosis(honks, userid)
|
honks = osmosis(honks, userid)
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,9 +14,9 @@
|
||||||
{{ if .TopXID }}
|
{{ if .TopXID }}
|
||||||
<div class="info" id="refreshbox">
|
<div class="info" id="refreshbox">
|
||||||
<script>
|
<script>
|
||||||
var topxid = { "home" : "{{ .TopXID }}" }
|
var topxid = { "{{ .PageName }}" : "{{ .TopXID }}" }
|
||||||
var honksforpage = { }
|
var honksforpage = { }
|
||||||
var thispagename = "home"
|
var thispagename = "{{ .PageName }}"
|
||||||
function fillinhonks(xhr) {
|
function fillinhonks(xhr) {
|
||||||
var doc = xhr.responseXML
|
var doc = xhr.responseXML
|
||||||
topxid[thispagename] = doc.children[0].children[1].children[0].innerText
|
topxid[thispagename] = doc.children[0].children[1].children[0].innerText
|
||||||
|
|
Loading…
Reference in New Issue