mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 18:41:47 +00:00
feat(plugin): support dynamic plugin load / unload
This commit is contained in:
@ -37,7 +37,7 @@ const createContext = <
|
||||
},
|
||||
});
|
||||
|
||||
const forceUnloadMainPlugin = (id: keyof PluginBuilderList, win: BrowserWindow) => {
|
||||
export const forceUnloadMainPlugin = (id: keyof PluginBuilderList, win: BrowserWindow) => {
|
||||
unregisterStyleMap[id]?.forEach((unregister) => unregister());
|
||||
delete unregisterStyleMap[id];
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ const createContext = <
|
||||
},
|
||||
});
|
||||
|
||||
const forceUnloadPreloadPlugin = (id: keyof PluginBuilderList) => {
|
||||
export const forceUnloadPreloadPlugin = (id: keyof PluginBuilderList) => {
|
||||
unregisterStyleMap[id]?.forEach((unregister) => unregister());
|
||||
delete unregisterStyleMap[id];
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ const createContext = <
|
||||
},
|
||||
});
|
||||
|
||||
const forceUnloadRendererPlugin = (id: keyof PluginBuilderList) => {
|
||||
export const forceUnloadRendererPlugin = (id: keyof PluginBuilderList) => {
|
||||
unregisterStyleMap[id]?.forEach((unregister) => unregister());
|
||||
delete unregisterStyleMap[id];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user