Fix ColorSighted
This commit is contained in:
parent
13c59f47cb
commit
465a87f66b
2 changed files with 4 additions and 2 deletions
|
@ -34,8 +34,9 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: ".AVATAR_STATUS_MOBILE_16;",
|
find: ".AVATAR_STATUS_MOBILE_16;",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(\.fromIsMobile,.+?)\i.status/,
|
match: /(?<=fromIsMobile:\i=!0,.+?)status:(\i)/,
|
||||||
replace: (_, rest) => `${rest}"online"`
|
// Rename field to force it to always use "online"
|
||||||
|
replace: 'status_$:$1="online"'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -167,6 +167,7 @@ function patchPush(webpackGlobal: any) {
|
||||||
try {
|
try {
|
||||||
const newCode = executePatch(replacement.match, replacement.replace as string);
|
const newCode = executePatch(replacement.match, replacement.replace as string);
|
||||||
if (newCode === code && !patch.noWarn) {
|
if (newCode === code && !patch.noWarn) {
|
||||||
|
(window.explosivePlugins ??= new Set<string>()).add(patch.plugin);
|
||||||
logger.warn(`Patch by ${patch.plugin} had no effect (Module id is ${id}): ${replacement.match}`);
|
logger.warn(`Patch by ${patch.plugin} had no effect (Module id is ${id}): ${replacement.match}`);
|
||||||
if (IS_DEV) {
|
if (IS_DEV) {
|
||||||
logger.debug("Function Source:\n", code);
|
logger.debug("Function Source:\n", code);
|
||||||
|
|
Loading…
Reference in a new issue