2024-10-13 00:35:36 +08:00
|
|
|
import { PluginInstanceInternal } from "@lib/addons/plugins/types";
|
2024-02-28 17:59:47 +08:00
|
|
|
|
2024-07-30 00:18:01 +08:00
|
|
|
interface CorePlugin {
|
2025-10-11 02:26:41 +02:00
|
|
|
default: PluginInstanceInternal;
|
|
|
|
|
preenabled: boolean;
|
2024-07-30 00:18:01 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Called from @lib/plugins
|
|
|
|
|
export const getCorePlugins = (): Record<string, CorePlugin> => ({
|
2025-10-11 02:26:41 +02:00
|
|
|
"bunny.quickinstall": { ...require("./quickinstall"), preenabled: true },
|
|
|
|
|
"bunny.badges": require("./badges"),
|
2025-11-16 20:12:31 +01:00
|
|
|
"bunny.notrack": require("./notrack"),
|
2025-11-08 21:42:02 +01:00
|
|
|
"bunny.messagefix": require("./messagefix"),
|
|
|
|
|
"bunny.fixembed": require("./fixembed"),
|
2025-11-30 18:25:32 +01:00
|
|
|
"bunny.enhancements": require("./shiggyenhancements")
|
2024-07-30 00:18:01 +08:00
|
|
|
});
|
2024-02-28 17:59:47 +08:00
|
|
|
|
2024-07-30 00:18:01 +08:00
|
|
|
/**
|
|
|
|
|
* @internal
|
|
|
|
|
*/
|
2025-10-11 02:26:41 +02:00
|
|
|
export function defineCorePlugin(
|
|
|
|
|
instance: PluginInstanceInternal,
|
|
|
|
|
): PluginInstanceInternal {
|
|
|
|
|
// @ts-expect-error
|
|
|
|
|
instance[Symbol.for("bunny.core.plugin")] = true;
|
|
|
|
|
return instance;
|
2024-03-06 01:57:59 +08:00
|
|
|
}
|