Fix reporter and AlwaysAnimate patch

main
Nuckyz 11 months ago
parent a8b0ce6f03
commit a5442d87d5
No known key found for this signature in database
GPG Key ID: 440BF8296E1C4AD9

@ -211,9 +211,12 @@ page.on("console", async e => {
switch (tag) { switch (tag) {
case "WebpackInterceptor:": case "WebpackInterceptor:":
const patchFailMatch = message.match(/Patch by (.+?) (had no effect|errored|found no module) \(Module id is (.+?)\): (.+)/)!;
if (!patchFailMatch) break;
process.exitCode = 1; process.exitCode = 1;
const [, plugin, type, id, regex] = message.match(/Patch by (.+?) (had no effect|errored|found no module) \(Module id is (.+?)\): (.+)/)!; const [, plugin, type, id, regex] = patchFailMatch;
report.badPatches.push({ report.badPatches.push({
plugin, plugin,
type, type,
@ -253,7 +256,7 @@ page.on("console", async e => {
).then(a => a.join(" ").trim()); ).then(a => a.join(" ").trim());
if (text.length && !text.startsWith("Failed to load resource: the server responded with a status of") && !text.includes("found no module Filter:")) { if (text.length && !text.startsWith("Failed to load resource: the server responded with a status of") && !text.includes("Webpack")) {
console.error("[Unexpected Error]", text); console.error("[Unexpected Error]", text);
report.otherErrors.push(text); report.otherErrors.push(text);
} }
@ -293,6 +296,7 @@ function runTime(token: string) {
p.patches?.forEach(patch => { p.patches?.forEach(patch => {
patch.plugin = p.name; patch.plugin = p.name;
delete patch.predicate; delete patch.predicate;
delete patch.group;
if (!Array.isArray(patch.replacement)) if (!Array.isArray(patch.replacement))
patch.replacement = [patch.replacement]; patch.replacement = [patch.replacement];

@ -48,9 +48,10 @@ export default definePlugin({
} }
}, },
{ {
// Guild Banner
find: ".animatedBannerHoverLayer,onMouseEnter:", find: ".animatedBannerHoverLayer,onMouseEnter:",
replacement: { replacement: {
match: /(?<=guildBanner:\i,animate:)\i/, match: /(?<=guildBanner:\i,animate:)\i(?=}\))/,
replace: "!0" replace: "!0"
} }
} }

Loading…
Cancel
Save