This commit is contained in:
go0p
2024-05-15 14:35:35 +08:00
parent dd1b2a9513
commit 0b8d8c81b9
+5 -2
View File
@@ -43,7 +43,10 @@ export const EvalInTab: React.FC<EvalInTabProps> = () => {
await chrome.runtime.sendMessage({ await chrome.runtime.sendMessage({
action: wsc.ActionType.INJECT_SCRIPT, action: wsc.ActionType.INJECT_SCRIPT,
tabId: tab.id, tabId: tab.id,
value: {mode: "CONTENT_EVAL_CODE", code: code}, value: {
mode: "CONTENT_EVAL_CODE",
code: code,
},
}); });
} catch (error) { } catch (error) {
} }
@@ -59,7 +62,7 @@ export const EvalInTab: React.FC<EvalInTabProps> = () => {
<TextArea <TextArea
value={inputArgsData} value={inputArgsData}
onChange={handleInputChange} onChange={handleInputChange}
placeholder="Enter your expression (e.g., 22 * 33)" placeholder="Enter function args"
/> />
<Button onClick={handleClick}>eval func in tab</Button> <Button onClick={handleClick}>eval func in tab</Button>