mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-19 11:27:02 -04:00
ConsoleShortcuts: Fix autocomplete on lazies, add more utils (#2519)
This commit is contained in:
parent
b9e83d9d28
commit
a78dba321d
3 changed files with 192 additions and 113 deletions
16
src/plugins/consoleShortcuts/native.ts
Normal file
16
src/plugins/consoleShortcuts/native.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* 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());
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue