Vencord/src/VencordNative.ts

11 lines
368 B
TypeScript
Raw Normal View History

2022-08-29 16:11:44 +00:00
import { IPC_QUICK_CSS_UPDATE, IPC_GET_QUICK_CSS } from './utils/ipcEvents';
import { ipcRenderer } from 'electron';
export default {
handleQuickCssUpdate(cb: (s: string) => void) {
ipcRenderer.on(IPC_QUICK_CSS_UPDATE, (_, css) => {
cb(css);
});
},
2022-08-29 16:45:58 +00:00
getQuickCss: () => ipcRenderer.invoke(IPC_GET_QUICK_CSS) as Promise<string>
2022-08-29 16:11:44 +00:00
};