mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-15 04:11:47 +00:00
change plugin system
This commit is contained in:
@ -1,17 +1,9 @@
|
||||
import { createPluginBuilder } from '../utils/builder';
|
||||
import { createPlugin } from '@/utils';
|
||||
|
||||
const builder = createPluginBuilder('bypass-age-restrictions', {
|
||||
export default createPlugin({
|
||||
name: 'Bypass Age Restrictions',
|
||||
restartNeeded: true,
|
||||
config: {
|
||||
enabled: false,
|
||||
},
|
||||
|
||||
// See https://github.com/zerodytrash/Simple-YouTube-Age-Restriction-Bypass#userscript
|
||||
renderer: () => import('simple-youtube-age-restriction-bypass'),
|
||||
});
|
||||
|
||||
export default builder;
|
||||
|
||||
declare global {
|
||||
interface PluginBuilderList {
|
||||
[builder.id]: typeof builder;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
import builder from './index';
|
||||
|
||||
export default builder.createRenderer(() => ({
|
||||
async onLoad() {
|
||||
// See https://github.com/zerodytrash/Simple-YouTube-Age-Restriction-Bypass#userscript
|
||||
await import('simple-youtube-age-restriction-bypass');
|
||||
},
|
||||
}));
|
||||
Reference in New Issue
Block a user