Fix post parsing and package.json meta links
This commit is contained in:
parent
ff51e38e9c
commit
be62c12b9e
14
package.json
14
package.json
@ -8,13 +8,13 @@
|
||||
"page": "https://github.com/TuxedoTako/4chan-xt",
|
||||
"downloads": "https://github.com/TuxedoTako/4chan-xt/releases",
|
||||
"oldVersions": "https://raw.githubusercontent.com/ccd0/4chan-x/",
|
||||
"faq": "https://github.com/TuxedoTako/wiki/Frequently-Asked-Questions",
|
||||
"captchaFAQ": "https://github.com/TuxedoTako/wiki/Captcha-FAQ",
|
||||
"cssGuide": "https://github.com/TuxedoTako/wiki/Styling-Guide",
|
||||
"license": "https://github.com/TuxedoTako/blob/master/LICENSE",
|
||||
"changelog": "https://github.com/TuxedoTako/blob/master/CHANGELOG.md",
|
||||
"issues": "https://github.com/TuxedoTako/issues",
|
||||
"newIssue": "https://github.com/TuxedoTako/issues",
|
||||
"faq": "https://github.com/TuxedoTako/4chan-xt/wiki/Frequently-Asked-Questions",
|
||||
"captchaFAQ": "https://github.com/TuxedoTako/4chan-xt/wiki/Captcha-FAQ",
|
||||
"cssGuide": "https://github.com/TuxedoTako/4chan-xt/wiki/Styling-Guide",
|
||||
"license": "https://github.com/TuxedoTako/4chan-xt/blob/master/LICENSE",
|
||||
"changelog": "https://github.com/TuxedoTako/4chan-xt/blob/master/CHANGELOG.md",
|
||||
"issues": "https://github.com/TuxedoTako/4chan-xt/issues",
|
||||
"newIssue": "https://github.com/TuxedoTako/4chan-xt/issues",
|
||||
"newIssueMaxLength": 8181,
|
||||
"alternatives": "https://www.4chan-x.net/4chan_alternatives.html",
|
||||
"appid": "lacclbnghgdicfifcamcmcnilckjamag",
|
||||
|
||||
@ -95,11 +95,14 @@ export default class Post {
|
||||
}
|
||||
}
|
||||
|
||||
const name = this.nodes.name?.textContent;
|
||||
const tripcode = this.nodes.tripcode?.textContent;
|
||||
|
||||
this.info = {
|
||||
subject: this.nodes.subject?.textContent || undefined,
|
||||
name: this.nodes.name?.textContent,
|
||||
name,
|
||||
email: this.nodes.email ? decodeURIComponent(this.nodes.email.href.replace(/^mailto:/, '')) : undefined,
|
||||
tripcode: this.nodes.tripcode?.textContent,
|
||||
tripcode,
|
||||
uniqueID: this.nodes.uniqueID?.textContent,
|
||||
capcode: this.nodes.capcode?.textContent.replace('## ', ''),
|
||||
pass: this.nodes.pass?.title.match(/\d*$/)[0],
|
||||
@ -107,7 +110,7 @@ export default class Post {
|
||||
flagCodeTroll: this.nodes.flag?.className.match(/bfl-(\w+)/)?.[1].toUpperCase(),
|
||||
flag: this.nodes.flag?.title,
|
||||
date: this.nodes.date ? g.SITE.parseDate(this.nodes.date) : undefined,
|
||||
nameBlock: Conf['Anonymize'] ? 'Anonymous' : `${this.info.name || ''} ${this.info.tripcode || ''}`.trim(),
|
||||
nameBlock: Conf['Anonymize'] ? 'Anonymous' : `${name || ''} ${tripcode || ''}`.trim(),
|
||||
};
|
||||
|
||||
if (this.info.capcode) { this.info.nameBlock += ` ## ${this.info.capcode}`; }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user