get some of classes.js building
This commit is contained in:
parent
5619b35643
commit
19c090fe90
|
@ -46,9 +46,11 @@ globalThis.LCNSite = class LCNSite {
|
||||||
this._isModLogPage = this._isModPage && (location.search == "?/log" || location.search.startsWith("?/log/"));
|
this._isModLogPage = this._isModPage && (location.search == "?/log" || location.search.startsWith("?/log/"));
|
||||||
this._unseen = 0;
|
this._unseen = 0;
|
||||||
this._pageTitle = document.title;
|
this._pageTitle = document.title;
|
||||||
|
|
||||||
this._doTitleUpdate = () => {
|
this._doTitleUpdate = () => {
|
||||||
document.title = (this._unseen > 0 ? `(${this._unseen}) ` : "") + this._pageTitle;
|
document.title = (this._unseen > 0 ? `(${this._unseen}) ` : "") + this._pageTitle;
|
||||||
};
|
};
|
||||||
|
|
||||||
this._favicon = document.querySelector("head > link[rel=\"shortcut icon\"]");
|
this._favicon = document.querySelector("head > link[rel=\"shortcut icon\"]");
|
||||||
this._generatedStyle = null;
|
this._generatedStyle = null;
|
||||||
}
|
}
|
||||||
|
@ -105,54 +107,55 @@ globalThis.LCNSite = class LCNSite {
|
||||||
|
|
||||||
LCNSite.INSTANCE = null;
|
LCNSite.INSTANCE = null;
|
||||||
|
|
||||||
// globalThis.LCNPostInfo = class LCNPostInfo {
|
globalThis.LCNPostInfo = class LCNPostInfo {
|
||||||
//
|
|
||||||
// static nodeAttrib = "$LCNPostInfo";
|
static "constructor" () {
|
||||||
// static selector = ".post:not(.grid-li)";
|
this._boardId = null;
|
||||||
// #boardId = null;
|
this._threadId = null;
|
||||||
// #threadId = null;
|
this._postId = null;
|
||||||
// #postId = null;
|
this._name = null;
|
||||||
// #name = null;
|
this._email = null;
|
||||||
// #email = null;
|
this._capcode = null;
|
||||||
// #capcode = null;
|
this._flag = null;
|
||||||
// #flag = null;
|
this._ip = null;
|
||||||
// #ip = null;
|
this._subject = null;
|
||||||
// #subject = null;
|
this._createdAt = null;
|
||||||
// #createdAt = null;
|
this._parent = null;
|
||||||
//
|
this._isThread = false;
|
||||||
// #parent = null;
|
this._isReply = false;
|
||||||
// #isThread = false;
|
this._isLocked = false;
|
||||||
// #isReply = false;
|
this._isSticky = false;
|
||||||
// #isLocked = false;
|
}
|
||||||
// #isSticky = false;
|
|
||||||
//
|
|
||||||
// static "assign" (post) { return post[this.nodeAttrib] ?? (post[this.nodeAttrib] = this.from(post)); }
|
static "assign" (post) { return post[this.nodeAttrib] ?? (post[this.nodeAttrib] = this.from(post)); }
|
||||||
// static "from" (post) {
|
static "from" (post) {
|
||||||
// assert.ok(post.classList.contains("post"), "Arty must be expected Element.")
|
assert.ok(post.classList.contains("post"), "Arty must be expected Element.")
|
||||||
// const inst = new this()
|
const inst = new this()
|
||||||
// const intro = post.querySelector(".intro")
|
const intro = post.querySelector(".intro")
|
||||||
// const link = intro.querySelector(".post_no:not([id])").href.split("/").reverse()
|
const link = intro.querySelector(".post_no:not([id])").href.split("/").reverse()
|
||||||
// inst.#postId = link[0].slice(link[0].indexOf("#q") + 2)
|
inst.#postId = link[0].slice(link[0].indexOf("#q") + 2)
|
||||||
// inst.#threadId = link[0].slice(0, link[0].indexOf("."))
|
inst.#threadId = link[0].slice(0, link[0].indexOf("."))
|
||||||
// inst.#boardId = link[2]
|
inst.#boardId = link[2]
|
||||||
// inst.#isThread = post.classList.contains("op")
|
inst.#isThread = post.classList.contains("op")
|
||||||
// inst.#isReply = !inst.#isThread
|
inst.#isReply = !inst.#isThread
|
||||||
//
|
|
||||||
// inst.#subject = intro.querySelector(".subject")?.innerText ?? null
|
inst.#subject = intro.querySelector(".subject")?.innerText ?? null
|
||||||
// inst.#name = intro.querySelector(".name")?.innerText ?? null
|
inst.#name = intro.querySelector(".name")?.innerText ?? null
|
||||||
// inst.#email = intro.querySelector(".email")?.href.slice(7) ?? null
|
inst.#email = intro.querySelector(".email")?.href.slice(7) ?? null
|
||||||
// inst.#flag = intro.querySelector(".flag")?.src.split("/").reverse()[0].slice(0, -4) ?? null
|
inst.#flag = intro.querySelector(".flag")?.src.split("/").reverse()[0].slice(0, -4) ?? null
|
||||||
//
|
|
||||||
// inst.#capcode = intro.querySelector(".capcode")?.innerText ?? null
|
inst.#capcode = intro.querySelector(".capcode")?.innerText ?? null
|
||||||
// inst.#ip = intro.querySelector(".ip-link")?.innerText ?? null
|
inst.#ip = intro.querySelector(".ip-link")?.innerText ?? null
|
||||||
// inst.#createdAt = new Date(intro.querySelector("time[datetime]").dateTime ?? NaN)
|
inst.#createdAt = new Date(intro.querySelector("time[datetime]").dateTime ?? NaN)
|
||||||
//
|
|
||||||
// inst.#isSticky = !!intro.querySelector("i.fa-thumb-tack")
|
inst.#isSticky = !!intro.querySelector("i.fa-thumb-tack")
|
||||||
// inst.#isLocked = !!intro.querySelector("i.fa-lock")
|
inst.#isLocked = !!intro.querySelector("i.fa-lock")
|
||||||
//
|
|
||||||
// return inst
|
return inst
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
|
|
||||||
// "getParent" () { return this.#parent; }
|
// "getParent" () { return this.#parent; }
|
||||||
// "__setParent" (inst) { return this.#parent = inst; }
|
// "__setParent" (inst) { return this.#parent = inst; }
|
||||||
//
|
//
|
||||||
|
@ -178,8 +181,11 @@ LCNSite.INSTANCE = null;
|
||||||
// return this.getBoardId() == info.getBoardId() && this.getPostId() == info.getPostId()
|
// return this.getBoardId() == info.getBoardId() && this.getPostId() == info.getPostId()
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
|
LCNPostInfo.nodeAttrib = "$LCNPostInfo";
|
||||||
|
LCNPostInfo.selector = ".post:not(.grid-li)";
|
||||||
|
|
||||||
// globalThis.LCNPost = class LCNPost {
|
// globalThis.LCNPost = class LCNPost {
|
||||||
//
|
//
|
||||||
// static nodeAttrib = "$LCNPost";
|
// static nodeAttrib = "$LCNPost";
|
||||||
|
|
Loading…
Reference in New Issue