armcord/assets/app/js/patchVencordQuickCSS.js
2026-01-29 19:54:33 +01:00

27 lines
No EOL
1.1 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// dirty hack to replace Vencord's quick css editor with Legcord's
// fixes the white window bug
if (window.VencordNative) {
Vencord.Settings.useQuickCss = false;
let settings = VencordNative.settings.get()
settings.useQuickCss = false;
VencordNative.settings.set(settings)
VencordNative.quickCss.openEditor = function openEditor() {
shelter.ui.openConfirmationModal({
header: () => "Vencord QuickCSS is not compatible",
body: () => `Vencords QuickCSS editor is not supported in Legcord. Legcord uses its own Quick CSS editor instead which can be found in it's respective themes section.
Would you like to import your existing Vencord CSS into Legcord?`,
type: "danger",
confirmText: "Import CSS",
cancelText: "Cancel"
}).then(
async () => {
const css = await VencordNative.quickCss.get();
window.legcord.themes.importQuickCss(css);
window.legcord.themes.openQuickCss()
},
() => console.log("Cancel.")
);
}
}