|
|
@ -20,6 +20,7 @@ import { registerCommand, unregisterCommand } from "@api/Commands";
|
|
|
|
import { addContextMenuPatch, removeContextMenuPatch } from "@api/ContextMenu";
|
|
|
|
import { addContextMenuPatch, removeContextMenuPatch } from "@api/ContextMenu";
|
|
|
|
import { Settings } from "@api/Settings";
|
|
|
|
import { Settings } from "@api/Settings";
|
|
|
|
import { Logger } from "@utils/Logger";
|
|
|
|
import { Logger } from "@utils/Logger";
|
|
|
|
|
|
|
|
import { canonicalizeFind } from "@utils/patches";
|
|
|
|
import { Patch, Plugin, StartAt } from "@utils/types";
|
|
|
|
import { Patch, Plugin, StartAt } from "@utils/types";
|
|
|
|
import { FluxDispatcher } from "@webpack/common";
|
|
|
|
import { FluxDispatcher } from "@webpack/common";
|
|
|
|
import { FluxEvents } from "@webpack/types";
|
|
|
|
import { FluxEvents } from "@webpack/types";
|
|
|
@ -83,8 +84,12 @@ for (const p of pluginsValues) {
|
|
|
|
if (p.patches && isPluginEnabled(p.name)) {
|
|
|
|
if (p.patches && isPluginEnabled(p.name)) {
|
|
|
|
for (const patch of p.patches) {
|
|
|
|
for (const patch of p.patches) {
|
|
|
|
patch.plugin = p.name;
|
|
|
|
patch.plugin = p.name;
|
|
|
|
if (!Array.isArray(patch.replacement))
|
|
|
|
|
|
|
|
|
|
|
|
canonicalizeFind(patch);
|
|
|
|
|
|
|
|
if (!Array.isArray(patch.replacement)) {
|
|
|
|
patch.replacement = [patch.replacement];
|
|
|
|
patch.replacement = [patch.replacement];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
patches.push(patch);
|
|
|
|
patches.push(patch);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|