fix: [Novel Fire]: Remove Bloat and Correct Filters (#1052)
* novel-fire: initial commit * novel-fire: added search novels * novel-fire: added icon * novel-fire: fix filter * novel-fire: fix summary * novel-fire: added parse chapter * novel-fire: update version * novel-fire: update icon * novel-fire: remove pages and parse all pages in parallel * novel-fire: remove bloat * novel-fire: fix bloat removal * novel-fire: fix filter * novel-fire: revert version
This commit is contained in:
@@ -7,7 +7,7 @@ import { Plugin } from '@typings/plugin';
|
|||||||
class NovelFire implements Plugin.PluginBase {
|
class NovelFire implements Plugin.PluginBase {
|
||||||
id = 'novelfire';
|
id = 'novelfire';
|
||||||
name = 'Novel Fire';
|
name = 'Novel Fire';
|
||||||
version = '1.0.0';
|
version = '1.0.1';
|
||||||
icon = 'src/en/novelfire/icon.png';
|
icon = 'src/en/novelfire/icon.png';
|
||||||
site = 'https://novelfire.net/';
|
site = 'https://novelfire.net/';
|
||||||
|
|
||||||
@@ -35,7 +35,8 @@ class NovelFire implements Plugin.PluginBase {
|
|||||||
params.append('rating', filters.rating.value);
|
params.append('rating', filters.rating.value);
|
||||||
params.append('status', filters.status.value);
|
params.append('status', filters.status.value);
|
||||||
params.append('sort', filters.sort.value);
|
params.append('sort', filters.sort.value);
|
||||||
url += `?${params.toString()}&page=${pageNo}`;
|
params.append('page', pageNo.toString());
|
||||||
|
url += `?${params.toString()}`;
|
||||||
} else {
|
} else {
|
||||||
url += `?ctgcon=and&totalchapter=0&ratcon=min&rating=0&status=-1&sort=all-time-rank&page=${pageNo}`;
|
url += `?ctgcon=and&totalchapter=0&ratcon=min&rating=0&status=-1&sort=all-time-rank&page=${pageNo}`;
|
||||||
}
|
}
|
||||||
@@ -169,7 +170,9 @@ class NovelFire implements Plugin.PluginBase {
|
|||||||
bloatElements.map(tag => {
|
bloatElements.map(tag => {
|
||||||
if (tag instanceof RegExp) {
|
if (tag instanceof RegExp) {
|
||||||
loadedCheerio('*')
|
loadedCheerio('*')
|
||||||
.filter((_, el) => tag.test(loadedCheerio(el).prop('tagName')!))
|
.filter((_, el) =>
|
||||||
|
tag.test(loadedCheerio(el).prop('tagName')!.toLowerCase()),
|
||||||
|
)
|
||||||
.remove();
|
.remove();
|
||||||
} else {
|
} else {
|
||||||
loadedCheerio(tag).remove();
|
loadedCheerio(tag).remove();
|
||||||
@@ -345,12 +348,12 @@ class NovelFire implements Plugin.PluginBase {
|
|||||||
value: '0',
|
value: '0',
|
||||||
options: [
|
options: [
|
||||||
{ label: 'All', value: '0' },
|
{ label: 'All', value: '0' },
|
||||||
{ label: '<50', value: '1%2C49' },
|
{ label: '<50', value: '1,49' },
|
||||||
{ label: '50-100', value: '50%2C100' },
|
{ label: '50-100', value: '50,100' },
|
||||||
{ label: '100-200', value: '100%2C200' },
|
{ label: '100-200', value: '100,200' },
|
||||||
{ label: '200-500', value: '200%2C500' },
|
{ label: '200-500', value: '200,500' },
|
||||||
{ label: '500-1000', value: '500%2C1000' },
|
{ label: '500-1000', value: '500,1000' },
|
||||||
{ label: '>1000', value: '1001%2C1000000' },
|
{ label: '>1000', value: '1001,1000000' },
|
||||||
],
|
],
|
||||||
type: FilterTypes.Picker,
|
type: FilterTypes.Picker,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user