From 64fda3b0a5a373571b4cf19c6e20f083dd102fae Mon Sep 17 00:00:00 2001 From: nexpid <60316309+nexpid@users.noreply.github.com> Date: Wed, 1 Jan 2025 15:06:54 +0100 Subject: [PATCH] feat(plugins): add `restore-devices` plugin Co-authored-by: PalmDevs --- src/plugins/restore-devices/index.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/plugins/restore-devices/index.ts diff --git a/src/plugins/restore-devices/index.ts b/src/plugins/restore-devices/index.ts new file mode 100644 index 0000000..a5b2a6d --- /dev/null +++ b/src/plugins/restore-devices/index.ts @@ -0,0 +1,21 @@ +import { registerPlugin } from '@revenge-mod/plugins/internals' + +registerPlugin( + { + name: 'Restore Devices Setting', + author: 'Palm', + description: 'Brings the Devices settings page back', + id: 'palmdevs.restore-devices-setting', + version: '1.0.0', + icon: 'LaptopPhoneIcon', + beforeAppRender({ patcher, revenge: { modules } }) { + const DevicesSetting = modules.findByFilePath<{ usePredicate(): boolean }, true>( + 'modules/main_tabs_v2/native/settings/definitions/DevicesSetting.tsx', + true, + ) + + patcher.instead(DevicesSetting!, 'usePredicate', () => true) + }, + }, + true, +)