novel-updates: ReadingPia (#1024)
This commit is contained in:
@@ -7,7 +7,7 @@ import { Plugin } from '@typings/plugin';
|
|||||||
class NovelUpdates implements Plugin.PluginBase {
|
class NovelUpdates implements Plugin.PluginBase {
|
||||||
id = 'novelupdates';
|
id = 'novelupdates';
|
||||||
name = 'Novel Updates';
|
name = 'Novel Updates';
|
||||||
version = '0.6.0';
|
version = '0.6.1';
|
||||||
icon = 'src/en/novelupdates/icon.png';
|
icon = 'src/en/novelupdates/icon.png';
|
||||||
site = 'https://www.novelupdates.com/';
|
site = 'https://www.novelupdates.com/';
|
||||||
|
|
||||||
@@ -294,9 +294,16 @@ class NovelUpdates implements Plugin.PluginBase {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'ko-fi':
|
case 'ko-fi':
|
||||||
chapterText = loadedCheerio('script:contains("shadowDom.innerHTML")')
|
const matchResult = loadedCheerio(
|
||||||
|
'script:contains("shadowDom.innerHTML")',
|
||||||
|
)
|
||||||
.html()
|
.html()
|
||||||
?.match(/shadowDom\.innerHTML \+= '(<div.*?)';/)![1];
|
?.match(/shadowDom\.innerHTML \+= '(<div.*?)';/);
|
||||||
|
if (matchResult && matchResult[1]) {
|
||||||
|
chapterText = matchResult[1];
|
||||||
|
} else {
|
||||||
|
chapterText = '';
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'mirilu':
|
case 'mirilu':
|
||||||
bloatClasses = ['#jp-post-flair'];
|
bloatClasses = ['#jp-post-flair'];
|
||||||
@@ -384,6 +391,11 @@ class NovelUpdates implements Plugin.PluginBase {
|
|||||||
chapterText = chapterContent;
|
chapterText = chapterContent;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'readingpia':
|
||||||
|
bloatClasses = ['.ezoic-ad', '.ezoic-adpicker-ad', '.ez-video-wrap'];
|
||||||
|
bloatClasses.map(tag => loadedCheerio(tag).remove());
|
||||||
|
chapterText = loadedCheerio('.chapter-body').html()!;
|
||||||
|
break;
|
||||||
case 'redoxtranslation':
|
case 'redoxtranslation':
|
||||||
const chapterID_redox = url.split('/').pop();
|
const chapterID_redox = url.split('/').pop();
|
||||||
chapterTitle = `Chapter ${chapterID_redox}`;
|
chapterTitle = `Chapter ${chapterID_redox}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user