mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-27 09:46:28 +00:00
16 lines
531 B
TypeScript
16 lines
531 B
TypeScript
/*
|
|
* Vencord, a Discord client mod
|
|
* Copyright (c) 2024 Vendicated and contributors
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
*/
|
|
|
|
import { IpcMainInvokeEvent } from "electron";
|
|
|
|
export function initDevtoolsOpenEagerLoad(e: IpcMainInvokeEvent) {
|
|
const handleDevtoolsOpened = () => e.sender.executeJavaScript("Vencord.Plugins.plugins.ConsoleShortcuts.eagerLoad(true)");
|
|
|
|
if (e.sender.isDevToolsOpened())
|
|
handleDevtoolsOpened();
|
|
else
|
|
e.sender.once("devtools-opened", () => handleDevtoolsOpened());
|
|
}
|