diff options
author | Vendicated <vendicated@riseup.net> | 2022-10-05 14:20:34 +0200 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2022-10-05 14:30:21 +0200 |
commit | 7e526e4172412eba720ffd1fa34511046ef47e6b (patch) | |
tree | 05587f306688ff65e9d5cfa96ddb31bc5a238518 /src/VencordNative.ts | |
parent | 98cfa090d4fcdf5ed934cf7435df9423fbe58932 (diff) | |
download | Vencord-7e526e4172412eba720ffd1fa34511046ef47e6b.tar.gz Vencord-7e526e4172412eba720ffd1fa34511046ef47e6b.tar.bz2 Vencord-7e526e4172412eba720ffd1fa34511046ef47e6b.zip |
Kill unsafe require
Diffstat (limited to 'src/VencordNative.ts')
-rw-r--r-- | src/VencordNative.ts | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/VencordNative.ts b/src/VencordNative.ts index 33bb869..494e9ff 100644 --- a/src/VencordNative.ts +++ b/src/VencordNative.ts @@ -27,14 +27,5 @@ export default { assertEventAllowed(event); return ipcRenderer.invoke(event, ...args); } - }, - require(mod: string) { - const settings = ipcRenderer.sendSync(IPC_EVENTS.GET_SETTINGS); - try { - if (!JSON.parse(settings).unsafeRequire) throw "no"; - } catch { - throw new Error("Unsafe require is not allowed. Enable it in settings and try again."); - } - return require(mod); } }; |