mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2025-12-14 18:45:06 +00:00
Create initial language support
Create support for languages, then reformat user, home, and post pages to use it, and create en and en-us language files.
This commit is contained in:
@@ -57,7 +57,7 @@ class ElemJS {
|
||||
event(name, callback) {
|
||||
this.element.addEventListener(name, event => callback(event))
|
||||
}
|
||||
child(toAdd, position) {
|
||||
child(toAdd, position = undefined) {
|
||||
if (typeof(toAdd) == "object") {
|
||||
toAdd.parent = this;
|
||||
if (typeof(position) == "number" && position >= 0) {
|
||||
|
||||
@@ -75,7 +75,7 @@ class NextPage extends FreezeWidth {
|
||||
fetch() {
|
||||
if (this.fetching) return
|
||||
this.fetching = true
|
||||
this.freeze("Loading...")
|
||||
this.freeze(this.element.getAttribute("data-loading-text"))
|
||||
const type = this.element.getAttribute("data-type")
|
||||
|
||||
return fetch(`/fragment/user/${this.element.getAttribute("data-username")}/${this.nextPageNumber}?type=${type}`).then(res => res.text()).then(text => {
|
||||
|
||||
Reference in New Issue
Block a user