Fix Patches

Co-Authored-By: sadan4 <117494111+sadan4@users.noreply.github.com>
This commit is contained in:
thororen1234 2025-09-25 18:42:23 -04:00
parent 41b6038f49
commit 1fcc55a463
No known key found for this signature in database
3 changed files with 6 additions and 10 deletions

View file

@ -77,11 +77,13 @@ export default definePlugin({
},
]
},
// Fix the settings cog context menu to work properly
{
find: "#{intl::USER_SETTINGS_ACTIONS_MENU_LABEL}",
replacement: {
match: /(?<=function\((\i),\i\)\{)(?=let \i=Object.values\(\i.\i\).*?(\i\.\i)\.open\()/,
replace: "$2.open($1);return;",
// Skip the check discord performs to make sure the section is valid
match: /(?<=function\((\i),(\i),\i\)\{)(?=let \i=Object.values\(\i\.\i\).*?(\(0,\i\.openUserSettings\))\()/,
replace: (_, target, section, func) => `${func}(${target},{section:${section}});return;`
},
},
],

View file

@ -48,7 +48,7 @@ export default definePlugin({
},
// Sections header
{
find: "#{intl::FRIENDS_SECTION_ONLINE}",
find: "#{intl::FRIENDS_SECTION_ONLINE}),className",
replacement: {
match: /,{id:(\i\.\i)\.PENDING,show:.+?className:(\i\.item)/,
replace: (rest, relationShipTypes, className) => `,{id:${relationShipTypes}.IMPLICIT,show:true,className:${className},content:"Implicit"}${rest}`

View file

@ -87,13 +87,7 @@ export const ListScrollerNone = LazyComponent(() => createListScroller(listScrol
export const ListScrollerThin = LazyComponent(() => createListScroller(listScrollerClasses.thin, listScrollerClasses.fade, "", ResizeObserver));
export const ListScrollerAuto = LazyComponent(() => createListScroller(listScrollerClasses.auto, listScrollerClasses.fade, "", ResizeObserver));
const { FocusLock_ } = mapMangledModuleLazy('document.getElementById("app-mount"))', {
FocusLock_: filters.componentByCode(".containerRef")
}) as {
FocusLock_: t.FocusLock;
};
export const FocusLock = LazyComponent(() => FocusLock_);
export const FocusLock = waitForComponent<t.FocusLock>("FocusLock", filters.componentByCode("containerRef,{keyboardModeEnabled"));
export let useToken: t.useToken;
waitFor(m => {