Roll back feedspub btn logic

This commit is contained in:
Tim Qian 2023-09-15 10:33:14 +08:00 committed by GitHub
parent d72e7cce9c
commit fcc829b840
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -58,11 +58,10 @@ async function getResultAndUpdateREADME() {
const getFeedsPubBtn = (feedLink, followCount) =>
`[<img src="https://img.shields.io/static/v1?label=follow&message=${followCount}&style=social&logo=rss">](https://feeds.pub/feed/${encodeURIComponent(feedLink)})`;
const newTable = table.map(row => {
const url = new URL(row[1])
return [
row[2] ? getFeedsPubBtn(row[2], row[4]) : '',
row[0].replace(/\|/g, '&#124;'),
`[${url.protocol}//${url.host}/](${url.href})`,
row[1],
row[3]
]
});