Add accordion and fix minor issues (#742)

* Add docs v0.0.1

* Add icon size warning

* Fix sourcenover caution

* Fix semver descriptions

* Filters fix

* Quickfix quickstart

* Add icon warning v2

* Fix typos

* Add NovelItem

* Update plugins host

* Update plugins host

* Remove unnecesarry .js and .dist

* Update plugins host

* Add host.ps1

* Fix readme.txt

* Fix READNE.txt, again

* Remove .js and .dist

* Add accordion

* Working pagination

* readme update with ost

* Add linux/windows hosting functions

* Add tswatch

* Fix fetch function

* Change plugin versions

* Fix chrome

* Fix workflows

* Fix search not showing results

* remove unnecesarry code

* Revert novelupdates changes

* Reverted NobleMTL instead of novelupdates, fixing that

* Revert nobleMTL to e346c7d0

* WTF NobleMTL?
This commit is contained in:
Marcin Majewski
2024-02-04 17:39:07 +01:00
committed by GitHub
parent fc52a6e665
commit e1207c172a
16 changed files with 4339 additions and 1872 deletions
+11 -6
View File
@@ -6,7 +6,7 @@ import { Plugin, isPlugin } from "@typings/plugin";
import { Filters } from "@libs/filterInputs";
const root = path.dirname(require?.main?.filename || "");
export const fetchHeaders: Record<string, string> = {}
export const fetchHeaders: Record<string, string> = {};
export const all_plugins = (): PluginList => {
const res: PluginList = {};
@@ -48,9 +48,12 @@ const getPlugin = async (
): Promise<Plugin.PluginBase | null> => {
console.log("loading plugin", requirePath);
const plugin = await require(requirePath).default;
console.log(plugin);
if (isPlugin(plugin)) return plugin;
console.log("Not a plugin!");
// console.log(plugin);
if (isPlugin(plugin)) {
console.log("loaded plugin", plugin.name);
return plugin;
}
console.error("Not a plugin!");
return null;
};
@@ -59,13 +62,15 @@ export const getFilter = async (pluginRequirePath: string) =>
export const popularNovels = async (
pluginRequirePath: string,
page: number,
options: Plugin.PopularNovelsOptions<Filters>
) => (await getPlugin(pluginRequirePath))?.popularNovels(1, options);
) => (await getPlugin(pluginRequirePath))?.popularNovels(page, options);
export const searchNovels = async (
pluginRequirePath: string,
page: number,
searchTerm: string
) => (await getPlugin(pluginRequirePath))?.searchNovels(searchTerm, 1);
) => (await getPlugin(pluginRequirePath))?.searchNovels(searchTerm, page);
export const parseNovelAndChapters = async (
pluginRequirePath: string,