From d4da01d52264f18b0b40e1e8617d0045490806e4 Mon Sep 17 00:00:00 2001 From: yofukashino Date: Sat, 16 Nov 2024 03:35:17 +0530 Subject: [PATCH] fixy fix the source fr fr this time uwu --- src/index.ts | 2 ++ src/injections/StreamSettings.tsx | 1 - src/injections/StreamUpsell.tsx | 10 +++------- src/lib/utils.ts | 13 +++++++++---- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/index.ts b/src/index.ts index 4d6942c..82bbbfc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -18,4 +18,6 @@ export const stop = (): void => { Injections.removeInjections(); }; +export * from "./lib/consts"; + export { Settings } from "./Components/Settings"; diff --git a/src/injections/StreamSettings.tsx b/src/injections/StreamSettings.tsx index 4955f00..d2da040 100644 --- a/src/injections/StreamSettings.tsx +++ b/src/injections/StreamSettings.tsx @@ -11,7 +11,6 @@ export default async (): Promise => { StreamSettings, loader, ([{ selectedSource }], res: React.ReactElement & Types.Tree) => { - console.log(res); const SourceContainer = Utils.findInReactTree(res, (c: React.ReactElement & Types.Tree) => c?.props?.children?.some((v) => v?.type?.toString()?.includes('.id.startsWith("screen")')), ) as React.ReactElement & Types.Tree; diff --git a/src/injections/StreamUpsell.tsx b/src/injections/StreamUpsell.tsx index 2aa4156..82ab876 100644 --- a/src/injections/StreamUpsell.tsx +++ b/src/injections/StreamUpsell.tsx @@ -22,16 +22,12 @@ export default async (): Promise => { if (MainText) MainText.props.children = "Premium Experience by yofukashino_, Donations Open."; } const ButtonContainer = Utils.findInReactTree(res, (c: React.ReactElement & Types.Tree) => - c?.props?.children?.props?.iconClassName?.includes("premiumIcon"), + c?.props?.children?.type?.toString()?.includes("StreamSettingsUpsellBanner.NitroButton"), ) as React.ReactElement & Types.Tree; if (ButtonContainer) { const { - props: { - children: { - props: { className, iconClassName, size }, - }, - }, - } = ButtonContainer; + props: { className, iconClassName, size }, + } = ButtonContainer.props.children.type({}); ButtonContainer.props.children = (