MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / runScriptInCurrentTab

Function runScriptInCurrentTab

scripts/helpers/utils.js:430–434  ·  view source on GitHub ↗
(func, args, world = "MAIN")

Source from the content-addressed store, hash-verified

428};
429
430export const runScriptInCurrentTab = async (func, args, world = "MAIN") => {
431 const tab = await getCurrentTab();
432 // focusToTab(tab);
433 return await runScriptInTab({ func, args, target: { tabId: tab.id }, world });
434};
435
436export const runScriptFileInCurrentTab = async (scriptFile, world = "MAIN") => {
437 const tab = await getCurrentTab();

Calls 2

getCurrentTabFunction · 0.70
runScriptInTabFunction · 0.70

Tested by

no test coverage detected