Feat(plugin)Add Foxteller (#984)
* test * optimization * terser@5.31.0 => terser@5.31.1
This commit is contained in:
@@ -77,8 +77,8 @@ class LightNovelWPPlugin implements Plugin.PluginBase {
|
||||
|
||||
const articles = html.match(/<article([\s\S]*?)<\/article>/g) || [];
|
||||
articles.forEach(article => {
|
||||
const novelName = article.match(/<a.*title="(.*?)"/)?.[1];
|
||||
const novelUrl = article.match(/<a href="(.*?)"/)?.[1];
|
||||
const [, novelUrl, novelName] =
|
||||
article.match(/<a href="(.*?)".*title="(.*?)"/) || [];
|
||||
|
||||
if (novelName && novelUrl) {
|
||||
const novelCover =
|
||||
@@ -148,10 +148,7 @@ class LightNovelWPPlugin implements Plugin.PluginBase {
|
||||
const parser = new Parser({
|
||||
onopentag(name, attribs) {
|
||||
// name and cover
|
||||
if (
|
||||
!novel.cover &&
|
||||
attribs['class']?.includes('ts-post-image' || 'wp-post-image')
|
||||
) {
|
||||
if (!novel.cover && attribs['class']?.includes('ts-post-image')) {
|
||||
novel.name = attribs['title'];
|
||||
novel.cover = attribs['data-src'] || attribs['src'] || defaultCover;
|
||||
} // genres
|
||||
|
||||
@@ -4,13 +4,10 @@ import * as fs from 'fs';
|
||||
const config = {
|
||||
compress: {
|
||||
arrows: false,
|
||||
booleans_as_integers: true,
|
||||
},
|
||||
mangle: {},
|
||||
ecma: 5, // specify one of: 5, 2015, 2016, etc.
|
||||
enclose: false, // or specify true, or "args:values"
|
||||
keep_classnames: false,
|
||||
keep_fnames: false,
|
||||
module: true,
|
||||
toplevel: true,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user