Key Inspector: add showToast to Eval scope

This commit is contained in:
everestmcarthur 2026-08-01 21:35:08 -04:00
parent 19e2316724
commit ab79f69e68
2 changed files with 4 additions and 1 deletions

View file

@ -2,6 +2,7 @@ import { findByProps, findByName, findByTypeName, findByStoreName, findByPropsAl
import { React, ReactNative, FluxDispatcher } from "@vendetta/metro/common";
import { instead, before, after } from "@vendetta/patcher";
import { getAssetIDByName } from "@vendetta/ui/assets";
import { showToast } from "@vendetta/ui/toasts";
import { rawFind, rawFindByTypeName, rawFindByProps, rawFindByName, rawFindByStoreName } from "@shared/lib/rawFind";
declare const window: any;
@ -86,6 +87,7 @@ export async function runEval(rawCode: string): Promise<string> {
"before",
"after",
"getAssetIDByName",
"showToast",
"React",
"ReactNative",
"FluxDispatcher",
@ -110,6 +112,7 @@ export async function runEval(rawCode: string): Promise<string> {
before,
after,
getAssetIDByName,
showToast,
React,
ReactNative,
FluxDispatcher,

View file

@ -89,7 +89,7 @@ function EvalSection() {
outside the sandbox. In scope: findByProps/findByName/
findByTypeName/findByStoreName/findByPropsAll/findByNameAll/find, the raw*
passive variants (rawFind/rawFindByTypeName/rawFindByProps/rawFindByName/
rawFindByStoreName), instead/before/after, getAssetIDByName, React, ReactNative,
rawFindByStoreName), instead/before/after, getAssetIDByName, showToast, React, ReactNative,
FluxDispatcher, and window. Nothing runs until you tap the button.
</Text>
</View>