added gallery section

This commit is contained in:
2025-11-30 21:18:19 +01:00
parent 658e4e09c4
commit ca2ed4187e
17 changed files with 1072 additions and 6 deletions

View File

@@ -28,7 +28,7 @@ async function loadExtensions() {
? new ExtensionClass()
: (ExtensionClass.default ? new ExtensionClass.default() : null);
if (instance && (instance.type === "anime-board" || instance.type === "book-board")) {
if (instance && (instance.type === "anime-board" || instance.type === "book-board" || instance.type === "image-board")) {
const name = instance.constructor.name;
extensions.set(name, instance);
console.log(`📦 Loaded Extension: ${name}`);
@@ -77,11 +77,22 @@ function getBookExtensionsMap() {
return bookExts;
}
function getGalleryExtensionsMap() {
const galleryExts = new Map();
for (const [name, ext] of extensions) {
if (ext.type === 'image-board') {
galleryExts.set(name, ext);
}
}
return galleryExts;
}
module.exports = {
loadExtensions,
getExtension,
getAllExtensions,
getExtensionsList,
getAnimeExtensionsMap,
getBookExtensionsMap
getBookExtensionsMap,
getGalleryExtensionsMap
};