Filters Redesign (#658)

* Add XCheckboxFilter

* Fix madara typo

* Change the branch name in config

* Add typing for madara popoularnovels filters

* Add preview and refactor PluginWrapper

* Add preview HTML sanitize and other improv.

* Web improvements + sanitizeHTML

* Add dark mode

* Add git run less to compile less

* Add less.js to remove the need for compiling less
This commit is contained in:
Marcin Majewski
2023-12-27 15:49:46 +01:00
committed by GitHub
parent 9cdace3460
commit d7a76063bf
170 changed files with 94169 additions and 80752 deletions
+6 -5
View File
@@ -3,8 +3,9 @@ import list from "./sources.json";
type sourceData = (typeof list)[number];
export const generateAll: ScrpitGeneratorFunction = function () {
export const generateAll: ScrpitGeneratorFunction = function (name) {
return list.map((source) => {
console.log(`[${name}] Generating:`, source.id);
return generator(source);
});
};
@@ -13,8 +14,8 @@ const generator = function generator(sourceJson: sourceData) {
const pluginId = sourceJson.id;
const sourceName = sourceJson.sourceName;
const site = sourceJson.sourceSite;
const reverseChapters = sourceJson.reverseChapters;
const iconFileName = sourceName.split('.')[0].toLowerCase() + '.png';
const reverseChapters = sourceJson.reverseChapters;
const iconFileName = sourceName.split(".")[0].toLowerCase() + ".png";
const pluginScript = `
import { CheerioAPI, load } from "cheerio";
import { fetchApi, fetchFile } from "@libs/fetch";
@@ -181,10 +182,10 @@ class LightNovelFRPlugin implements Plugin.PluginBase {
}
export default new LightNovelFRPlugin();`;
return {
lang: sourceJson.lang,
filename: sourceName,
pluginScript,
};
};
};