From 02db20f846857374b9b5f1e7dbd475befdf47b71 Mon Sep 17 00:00:00 2001 From: AAGaming Date: Sat, 21 Nov 2026 21:14:41 -0500 Subject: esmodule support base --- frontend/src/toaster.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'frontend/src/toaster.tsx') diff --git a/frontend/src/toaster.tsx b/frontend/src/toaster.tsx index e5b2d986..572a1bba 100644 --- a/frontend/src/toaster.tsx +++ b/frontend/src/toaster.tsx @@ -4,7 +4,7 @@ import { ErrorBoundary, Patch, callOriginal, - findModuleExport, + findVar, injectFCTrampoline, replacePatch, } from '@decky/ui'; @@ -27,7 +27,8 @@ class Toaster extends Logger { window.__TOASTER_INSTANCE?.deinit?.(); window.__TOASTER_INSTANCE = this; - const ValveToastRenderer = findModuleExport((e) => e?.toString?.()?.includes(`controller:"notification",method:`)); + // TODO regex? + const ValveToastRenderer = findVar((e) => e?.toString?.()?.includes(`controller:\`notification\`,method:`)); // TODO find a way to undo this if possible? const patchedRenderer = injectFCTrampoline(ValveToastRenderer); this.toastPatch = replacePatch(patchedRenderer, 'component', (args: any[]) => { -- cgit v1.2.3