mirror of
https://github.com/System-End/Vencord.git
synced 2026-04-19 19:45:09 +00:00
BetterSettings: fix "Disable Fade" feature (#4007)
Closes #3970 Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
parent
710c391697
commit
0e7757666d
1 changed files with 23 additions and 2 deletions
|
|
@ -126,6 +126,28 @@ export default definePlugin({
|
|||
],
|
||||
predicate: () => settings.store.disableFade
|
||||
},
|
||||
{ // Disable fade animations for settings menu
|
||||
find: "layer-modal",
|
||||
replacement: [
|
||||
{
|
||||
match: /(\i)\.animated\.div(?=,\{"data-mana-component":"layer-modal")/,
|
||||
replace: '"div"'
|
||||
},
|
||||
{
|
||||
match: /(?<="data-mana-component":"layer-modal"[^}]*?)style:\i,/,
|
||||
replace: "style:{},"
|
||||
}
|
||||
],
|
||||
predicate: () => settings.store.disableFade
|
||||
},
|
||||
{ // Disable initial and exit delay for settings menu
|
||||
find: "headerId:void 0,headerIdIsManaged:!1",
|
||||
replacement: {
|
||||
match: /let (\i)=300/,
|
||||
replace: "let $1=0"
|
||||
},
|
||||
predicate: () => settings.store.disableFade
|
||||
},
|
||||
{ // Load menu TOC eagerly
|
||||
find: "handleOpenSettingsContextMenu=",
|
||||
replacement: {
|
||||
|
|
@ -134,8 +156,7 @@ export default definePlugin({
|
|||
},
|
||||
predicate: () => settings.store.eagerLoad
|
||||
},
|
||||
{
|
||||
// Settings cog context menu
|
||||
{ // Settings cog context menu
|
||||
find: "#{intl::USER_SETTINGS_ACTIONS_MENU_LABEL}",
|
||||
replacement: [
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue