Skip to content

Commit

Permalink
fixy fix the source fr fr this time uwu
Browse files Browse the repository at this point in the history
  • Loading branch information
yofukashino committed Nov 15, 2024
1 parent aee72dd commit d4da01d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ export const stop = (): void => {
Injections.removeInjections();
};

export * from "./lib/consts";

export { Settings } from "./Components/Settings";
1 change: 0 additions & 1 deletion src/injections/StreamSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export default async (): Promise<void> => {
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;
Expand Down
10 changes: 3 additions & 7 deletions src/injections/StreamUpsell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,12 @@ export default async (): Promise<void> => {
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 = (
<Button
onClick={() => open("https://ko-fi.com/yofukashino")}
Expand Down
13 changes: 9 additions & 4 deletions src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,20 @@ export const setCustomParameters = (streamingConstants: Types.StreamingConstants
},
ApplicationStreamResolutionButtons: streamingConstants.resolution.map((resolution) => ({
value: resolution,
label:
resolution == 0
get label() {
return resolution == 0
? Modules.ApplicationStreamingOption[streamStoreKeys.makeResolutionLabel](0)
: resolution,
: resolution;
},
})),
ApplicationStreamResolutionButtonsWithSuffixLabel: streamingConstants.resolution.map(
(resolution) => ({
value: resolution,
label: Modules.ApplicationStreamingOption[streamStoreKeys.makeResolutionLabel](resolution),
get label() {
return Modules.ApplicationStreamingOption[streamStoreKeys.makeResolutionLabel](
resolution,
);
},
}),
),
ApplicationStreamResolutions: Object.assign(
Expand Down

0 comments on commit d4da01d

Please sign in to comment.