fix: fix plugins cannot load config

This commit is contained in:
Su-Yong
2023-09-04 03:04:44 +09:00
parent 5069913c56
commit b5472c11df
8 changed files with 9 additions and 11 deletions

View File

@ -1,4 +1,4 @@
import { PluginConfig } from '../../config/dynamic';
const config = new PluginConfig('downloader');
export default { ...config } as PluginConfig<'downloader'>;
export default config;

View File

@ -43,7 +43,8 @@ const menuObserver = new MutationObserver(() => {
// TODO: re-enable once contextIsolation is set to true
// contextBridge.exposeInMainWorld("downloader", {
// download: () => {
export const download = () => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-member-access
(global as any).download = () => {
let videoUrl = getSongMenu()
// Selector of first button which is always "Start Radio"
?.querySelector('ytmusic-menu-navigation-item-renderer[tabindex="0"] #navigation-endpoint')