diff options
Diffstat (limited to 'frontend/src/plugin-loader.tsx')
| -rw-r--r-- | frontend/src/plugin-loader.tsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/frontend/src/plugin-loader.tsx b/frontend/src/plugin-loader.tsx index ddb92542..fc1f57e9 100644 --- a/frontend/src/plugin-loader.tsx +++ b/frontend/src/plugin-loader.tsx @@ -6,6 +6,7 @@ import PluginView from './components/PluginView'; import TitleView from './components/TitleView'; import Logger from './logger'; import { Plugin } from './plugin'; +import RouterHook from './router-hook'; import TabsHook from './tabs-hook'; declare global { @@ -15,6 +16,8 @@ declare global { class PluginLoader extends Logger { private plugins: Plugin[] = []; private tabsHook: TabsHook = new TabsHook(); + // private windowHook: WindowHook = new WindowHook(); + private routerHook: RouterHook = new RouterHook(); private deckyState: DeckyState = new DeckyState(); constructor() { @@ -81,6 +84,7 @@ class PluginLoader extends Logger { static createPluginAPI(pluginName: string) { return { + routerHook: this.routerHook, async callServerMethod(methodName: string, args = {}) { const response = await fetch(`http://127.0.0.1:1337/methods/${methodName}`, { method: 'POST', |
