Fix Visual Refresh titlebar (#1104)

This commit is contained in:
Sqaaakoi
2025-04-04 15:44:47 +02:00
committed by GitHub
parent 765ffc0b57
commit c42c1b7bbd
5 changed files with 52 additions and 22 deletions
+18 -4
View File
@@ -19,11 +19,25 @@ if (Settings.store.customTitleBar)
// eslint-disable-next-line no-useless-escape
match: /case \i\.\i\.WINDOWS:/,
replace: 'case "WEB":'
}
]
},
// Visual Refresh
{
find: '"data-windows":',
replacement: [
{
// TODO: Fix eslint rule
// eslint-disable-next-line no-useless-escape
match: /\i===\i\.PlatformTypes\.WINDOWS/g,
replace: "true"
},
...["close", "minimize", "maximize"].map(op => ({
match: new RegExp(String.raw`\i\.\i\.${op}\b`),
replace: `VesktopNative.win.${op}`
}))
{
// TODO: Fix eslint rule
// eslint-disable-next-line no-useless-escape
match: /\i===\i\.PlatformTypes\.WEB/g,
replace: "false"
}
]
}
]