diff options
author | Vendicated <vendicated@riseup.net> | 2022-10-04 00:52:42 +0200 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2022-10-04 00:52:50 +0200 |
commit | cc257533148419b1c94a1cd257e756d2688a403c (patch) | |
tree | 84affcf23ec84304efcb381626ac4d995db0ec95 /src/utils | |
parent | a9eae106c7cc6cccbb5c3f030130d3c7b6461c3e (diff) | |
download | Vencord-cc257533148419b1c94a1cd257e756d2688a403c.tar.gz Vencord-cc257533148419b1c94a1cd257e756d2688a403c.tar.bz2 Vencord-cc257533148419b1c94a1cd257e756d2688a403c.zip |
feat: Experimental browser support
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/isWeb.ts | 1 | ||||
-rw-r--r-- | src/utils/types.ts | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/utils/isWeb.ts b/src/utils/isWeb.ts new file mode 100644 index 0000000..4082164 --- /dev/null +++ b/src/utils/isWeb.ts @@ -0,0 +1 @@ +export const IS_WEB = window.IS_WEB = typeof window.DiscordNative === "undefined"; diff --git a/src/utils/types.ts b/src/utils/types.ts index a6b79c5..1c63613 100644 --- a/src/utils/types.ts +++ b/src/utils/types.ts @@ -33,6 +33,10 @@ interface PluginDef { patches?: Omit<Patch, "plugin">[]; dependencies?: string[], required?: boolean; + /** + * Set this if your plugin only works on Browser or Desktop, not both + */ + target?: "WEB" | "DESKTOP" | "BOTH"; } export type IpcRes<V = any> = { ok: true; value: V; } | { ok: false, error: any; }; |