Fix(Madara & lighnovelwp): remove site url regardless of this.site (#965)

* remove site url regardless of this.site
& riwyat new url

* MTL-Novel fix empty novels
This commit is contained in:
Justin COLLON
2024-05-30 18:41:49 +02:00
committed by GitHub
parent 3e42af8953
commit a72ab256f7
3 changed files with 15 additions and 9 deletions
+8 -3
View File
@@ -69,7 +69,12 @@ class MadaraPlugin implements Plugin.PluginBase {
: letter;
})
.join('');
$el.html($el.html()?.replace($el.text(), reversedLetters).replace('\n', '<br>') || '');
$el.html(
$el
.html()
?.replace($el.text(), reversedLetters)
.replace('\n', '<br>') || '',
);
});
}
return text;
@@ -125,7 +130,7 @@ class MadaraPlugin implements Plugin.PluginBase {
const novel: Plugin.NovelItem = {
name: novelName,
cover: novelCover,
path: novelUrl.replace(this.site, ''),
path: novelUrl.replace(/https?:\/\/.*?\//, '/'),
};
novels.push(novel);
},
@@ -249,7 +254,7 @@ class MadaraPlugin implements Plugin.PluginBase {
chapters.push({
name: chapterName,
path: chapterUrl.replace(this.site, ''),
path: chapterUrl.replace(/https?:\/\/.*?\//, '/'),
releaseTime: releaseDate || null,
chapterNumber: totalChapters - chapterIndex,
});