migrate executeJavaScript calls to new command system
This commit is contained in:
@@ -62,6 +62,10 @@ export const enum IpcCommands {
|
||||
RPC_ACTIVITY = "rpc:activity",
|
||||
RPC_INVITE = "rpc:invite",
|
||||
RPC_DEEP_LINK = "rpc:link",
|
||||
|
||||
NAVIGATE_SETTINGS = "navigate:settings",
|
||||
GET_LANGUAGES = "navigator.languages"
|
||||
|
||||
GET_LANGUAGES = "navigator.languages",
|
||||
|
||||
SCREEN_SHARE_PICKER = "screenshare:picker"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
|
||||
* Copyright (c) 2025 Vendicated and Vesktop contributors
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
export function stripIndent(strings: TemplateStringsArray, ...values: any[]) {
|
||||
const string = String.raw({ raw: strings }, ...values);
|
||||
|
||||
const match = string.match(/^[ \t]*(?=\S)/gm);
|
||||
if (!match) return string.trim();
|
||||
|
||||
const minIndent = match.reduce((r, a) => Math.min(r, a.length), Infinity);
|
||||
return string.replace(new RegExp(`^[ \\t]{${minIndent}}`, "gm"), "").trim();
|
||||
}
|
||||
Reference in New Issue
Block a user