added gallery section
This commit is contained in:
@@ -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
|
||||
};
|
||||
Reference in New Issue
Block a user