diff options
-rw-r--r-- | src/VencordNative.ts | 9 | ||||
-rw-r--r-- | src/api/settings.ts | 2 | ||||
-rw-r--r-- | src/components/Settings.tsx | 7 |
3 files changed, 0 insertions, 18 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); } }; diff --git a/src/api/settings.ts b/src/api/settings.ts index 17f3f12..3328323 100644 --- a/src/api/settings.ts +++ b/src/api/settings.ts @@ -5,7 +5,6 @@ import { mergeDefaults } from '../utils/misc'; interface Settings { notifyAboutUpdates: boolean; - unsafeRequire: boolean; useQuickCss: boolean; plugins: { [plugin: string]: { @@ -17,7 +16,6 @@ interface Settings { const DefaultSettings: Settings = { notifyAboutUpdates: true, - unsafeRequire: false, useQuickCss: true, plugins: {} }; diff --git a/src/components/Settings.tsx b/src/components/Settings.tsx index 007767e..4e0196f 100644 --- a/src/components/Settings.tsx +++ b/src/components/Settings.tsx @@ -111,13 +111,6 @@ export default ErrorBoundary.wrap(function Settings() { > Get notified about new Updates </Switch>} - {!IS_WEB && <Switch - value={settings.unsafeRequire} - onChange={(v: boolean) => settings.unsafeRequire = v} - note="Enables VencordNative.require. Useful for testing, very bad for security. Leave this off unless you need it." - > - Enable Unsafe Require - </Switch>} <Forms.FormDivider /> |