clean up
This commit is contained in:
parent
bb3f629672
commit
ac61a0377f
|
@ -160,8 +160,7 @@ function initWs(isManual = false) {
|
||||||
return reply("Expected exactly one 'find' matches, found " + keys.length);
|
return reply("Expected exactly one 'find' matches, found " + keys.length);
|
||||||
|
|
||||||
const mod = candidates[keys[0]];
|
const mod = candidates[keys[0]];
|
||||||
// @ts-ignore
|
let src = mod.toString().replaceAll("\n", "");
|
||||||
let src = String(mod.$$vencordOriginal ?? mod).replaceAll("\n", "");
|
|
||||||
|
|
||||||
if (src.startsWith("function(")) {
|
if (src.startsWith("function(")) {
|
||||||
src = "0," + src;
|
src = "0," + src;
|
||||||
|
|
|
@ -501,7 +501,7 @@ export function search(...filters: Array<string | RegExp>) {
|
||||||
outer:
|
outer:
|
||||||
for (const id in factories) {
|
for (const id in factories) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const factory = factories[id].$$vencordOriginal ?? factories[id];
|
const factory = factories[id];
|
||||||
const str: string = factory.toString();
|
const str: string = factory.toString();
|
||||||
for (const filter of filters) {
|
for (const filter of filters) {
|
||||||
if (typeof filter === "string" && !str.includes(filter)) continue outer;
|
if (typeof filter === "string" && !str.includes(filter)) continue outer;
|
||||||
|
|
Loading…
Reference in a new issue