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:
@@ -587,6 +587,12 @@ class NewComicSource extends ComicSource {
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* [Optional] load comments
|
* [Optional] load comments
|
||||||
|
*
|
||||||
|
* Since app version 1.0.6, rich text is supported in comments.
|
||||||
|
* Following html tags are supported: ['a', 'b', 'i', 'u', 's', 'br', 'span', 'img'].
|
||||||
|
* span tag supports style attribute, but only support font-weight, font-style, text-decoration.
|
||||||
|
* All images will be placed at the end of the comment.
|
||||||
|
* Auto link detection is enabled, but only http/https links are supported.
|
||||||
* @param comicId {string}
|
* @param comicId {string}
|
||||||
* @param subId {string?} - ComicDetails.subId
|
* @param subId {string?} - ComicDetails.subId
|
||||||
* @param page {number}
|
* @param page {number}
|
||||||
|
10
ehentai.js
10
ehentai.js
@@ -7,7 +7,7 @@ class Ehentai extends ComicSource {
|
|||||||
// unique id of the source
|
// unique id of the source
|
||||||
key = "ehentai"
|
key = "ehentai"
|
||||||
|
|
||||||
version = "1.0.7"
|
version = "1.0.8"
|
||||||
|
|
||||||
minAppVersion = "1.0.0"
|
minAppVersion = "1.0.0"
|
||||||
|
|
||||||
@@ -963,7 +963,13 @@ class Ehentai extends ComicSource {
|
|||||||
for(let c of document.querySelectorAll('div.c1')) {
|
for(let c of document.querySelectorAll('div.c1')) {
|
||||||
let name = c.querySelector('div.c3 > a').text
|
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 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)
|
let score = Number(c.querySelector('div.c5 > span')?.text)
|
||||||
if(isNaN(score)) {
|
if(isNaN(score)) {
|
||||||
score = null
|
score = null
|
||||||
|
@@ -45,7 +45,7 @@
|
|||||||
"name": "ehentai",
|
"name": "ehentai",
|
||||||
"fileName": "ehentai.js",
|
"fileName": "ehentai.js",
|
||||||
"key": "ehentai",
|
"key": "ehentai",
|
||||||
"version": "1.0.7"
|
"version": "1.0.8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "禁漫天堂",
|
"name": "禁漫天堂",
|
||||||
|
Reference in New Issue
Block a user