Fix settings & updater for Canary

This commit is contained in:
Nuckyz 2024-11-03 15:47:19 -03:00
parent e7e298d2e7
commit 5216bcca1e
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -57,7 +57,7 @@ export default definePlugin({
]
},
{
find: "Messages.ACTIVITY_SETTINGS",
find: ".SEARCH_NO_RESULTS&&0===",
replacement: [
{
match: /(?<=section:(.{0,50})\.DIVIDER\}\))([,;])(?=.{0,200}(\i)\.push.{0,100}label:(\i)\.header)/,
@ -148,6 +148,7 @@ export default definePlugin({
if (!header) return;
try {
const names = {
top: i18n.Messages.USER_SETTINGS,
aboveNitro: i18n.Messages.BILLING_SETTINGS,
@ -155,6 +156,9 @@ export default definePlugin({
aboveActivity: i18n.Messages.ACTIVITY_SETTINGS
};
return header === names[settingsLocation];
} catch {
return firstChild === "PREMIUM";
}
},
patchedSettings: new WeakSet(),