New Plugin: HideAttachments

This commit is contained in:
Vendicated 2022-11-24 01:00:13 +01:00
parent c9fac8ffff
commit 5dd0a3a746
No known key found for this signature in database
GPG key ID: EC781ADFB93EFFA3
2 changed files with 125 additions and 1 deletions

View file

@ -28,7 +28,7 @@ export async function toggle(isEnabled: boolean) {
style.id = "vencord-custom-css";
document.head.appendChild(style);
VencordNative.ipc.on(IpcEvents.QUICK_CSS_UPDATE, (_, css: string) => style.innerText = css);
style.innerText = await VencordNative.ipc.invoke(IpcEvents.GET_QUICK_CSS);
style.textContent = await VencordNative.ipc.invoke(IpcEvents.GET_QUICK_CSS);
}
} else // @ts-ignore yes typescript, property 'disabled' does exist on type 'HTMLStyleElement' u should try reading the docs some time
style.disabled = !isEnabled;