This commit is contained in:
go0p
2024-05-15 14:43:04 +08:00
committed by go0p
parent 207e8172f1
commit cb05ab70e3
+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>