[Feature]
All checks were successful
Node.js CI / build-and-test (push) Successful in 25s

移除书签机制
更新了项目描述
增加对有章节作品阅读支持

[BugFix]
BetterHr 无法在 Markdown 显示的问题

[Base]
增加 Markdown 渲染锚点支持
This commit is contained in:
2025-05-18 13:33:39 +08:00
parent 9ef6da3efb
commit 4323acb4d6
13 changed files with 165 additions and 217 deletions

View File

@ -20,6 +20,7 @@ function convert(from) {
}
} else if (from.includes('https://archiveofourown.org/works/')) {
const sid = from.split('https://archiveofourown.org/works/')[1];
console.log(sid)
if ( sid ) {
const id = Number(sid)
if (id) {
@ -27,17 +28,24 @@ function convert(from) {
type: 's',
id
}
} else {
const splited = sid.split('/chapters/')
const id = Number(splited[0])
const cid = Number(splited[1])
if (id && cid) {
return {
type: 'c',
id, cid
}
}
}
}
}
return {
type: null,
}
return { type: null }
}
function onConvert(data) {
const { type, id, cid } = convert(data.src)
console.log(type, id, cid)
if (type == null) {
err.value = true
srcText.value?.focus()