betterSettings: fix patch

This commit is contained in:
sadan 2026-02-04 18:14:24 -05:00
parent 74f2dc11f2
commit 234ad59984
No known key found for this signature in database

View file

@ -101,8 +101,13 @@ export default definePlugin({
find: "this.renderArtisanalHack()",
replacement: [
{ // Fade in on layer
match: /(?<=\((\i),"contextType",\i\.\i\);)/,
replace: "$1=$self.Layer;",
// class Layer {
// static contextType = ...;
// ...
// }
// class OtherClass {
match: /(static contextType=\i\.\i;.+?})(?=class)(?<=class (\i).+?)/,
replace: (_, before, Layer) => `${before};${Layer}=$self.Layer;`,
predicate: () => settings.store.disableFade
},
{ // Lazy-load contents