mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 15:51:59 +00:00
display overhaul, compatibility with legacy plugins, fixes
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import PluginLoader from "./plugin-loader"
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
DeckyPluginLoader: PluginLoader;
|
||||
importDeckyPlugin: Function;
|
||||
syncDeckyPlugins: Function;
|
||||
}
|
||||
}
|
||||
window.DeckyPluginLoader = new PluginLoader();
|
||||
window.importDeckyPlugin = function(name: string) {
|
||||
window.DeckyPluginLoader?.importPlugin(name);
|
||||
}
|
||||
window.syncDeckyPlugins = async function() {
|
||||
const plugins = await (await fetch("http://127.0.0.1:1337/plugins")).json();
|
||||
for (const plugin of plugins) {
|
||||
window.DeckyPluginLoader?.importPlugin(plugin);
|
||||
}
|
||||
}
|
||||
|
||||
setTimeout(() => window.syncDeckyPlugins(), 5000);
|
||||
Reference in New Issue
Block a user