From 6522ebf0cad1723a278144b6c5d8557cd47e52d6 Mon Sep 17 00:00:00 2001
From: AAGaming <aagaming@riseup.net>
Date: Sat, 30 Dec 2023 00:46:59 -0500
Subject: Implement legacy & modern plugin method calls over WS

This version builds fine and runs all of the 14 plugins I have installed perfectly, so we're really close to having this done.
---
 frontend/src/start.tsx | 18 ------------------
 1 file changed, 18 deletions(-)

(limited to 'frontend/src/start.tsx')

diff --git a/frontend/src/start.tsx b/frontend/src/start.tsx
index a125e3d4..cc2c02c2 100644
--- a/frontend/src/start.tsx
+++ b/frontend/src/start.tsx
@@ -10,7 +10,6 @@ declare global {
     DeckyPluginLoader: PluginLoader;
     DeckyUpdater?: DeckyUpdater;
     importDeckyPlugin: Function;
-    syncDeckyPlugins: Function;
     deckyHasLoaded: boolean;
     deckyHasConnectedRDT?: boolean;
     deckyAuthToken: string;
@@ -53,23 +52,6 @@ declare global {
   window.importDeckyPlugin = function (name: string, version: string) {
     window.DeckyPluginLoader?.importPlugin(name, version);
   };
-
-  window.syncDeckyPlugins = async function () {
-    const plugins = await (
-      await fetch('http://127.0.0.1:1337/plugins', {
-        credentials: 'include',
-        headers: { Authentication: window.deckyAuthToken },
-      })
-    ).json();
-    for (const plugin of plugins) {
-      if (!window.DeckyPluginLoader.hasPlugin(plugin.name))
-        window.DeckyPluginLoader?.importPlugin(plugin.name, plugin.version);
-    }
-
-    window.DeckyPluginLoader.checkPluginUpdates();
-  };
-
-  setTimeout(() => window.syncDeckyPlugins(), 5000);
 })();
 
 export default i18n;
-- 
cgit v1.2.3

