mirror of
https://github.com/venera-app/venera-configs.git
synced 2025-09-27 08:27:24 +00:00
support rich text comments
This commit is contained in:
10
ehentai.js
10
ehentai.js
@@ -7,7 +7,7 @@ class Ehentai extends ComicSource {
|
||||
// unique id of the source
|
||||
key = "ehentai"
|
||||
|
||||
version = "1.0.7"
|
||||
version = "1.0.8"
|
||||
|
||||
minAppVersion = "1.0.0"
|
||||
|
||||
@@ -963,7 +963,13 @@ class Ehentai extends ComicSource {
|
||||
for(let c of document.querySelectorAll('div.c1')) {
|
||||
let name = c.querySelector('div.c3 > a').text
|
||||
let time = c.querySelector('div.c3')?.text?.split("Posted on")?.at(1)?.split('by')?.at(0)?.trim() ?? 'unknown'
|
||||
let content = c.querySelector('div.c6').text
|
||||
let content = ''
|
||||
if(typeof appVersion) {
|
||||
// since 1.0.6, [appVersion] field is available and rich comment is supported
|
||||
content = c.querySelector('div.c6').innerHTML
|
||||
} else {
|
||||
content = c.querySelector('div.c6').text
|
||||
}
|
||||
let score = Number(c.querySelector('div.c5 > span')?.text)
|
||||
if(isNaN(score)) {
|
||||
score = null
|
||||
|
Reference in New Issue
Block a user