MCPcopy Index your code
hub / github.com/violentmonkey/violentmonkey / reloadTabForScript

Function reloadTabForScript

src/background/utils/tabs.js:240–245  ·  view source on GitHub ↗
(script)

Source from the content-addressed store, hash-verified

238
239/** Reloads the active tab if script matches the URL */
240export async function reloadTabForScript(script) {
241 const { url, id } = await getActiveTab();
242 if (injectableRe.test(url) && testScript(url, script)) {
243 return browser.tabs.reload(id);
244 }
245}

Callers 1

parseScriptFunction · 0.90

Calls 3

getActiveTabFunction · 0.90
testScriptFunction · 0.90
testMethod · 0.45

Tested by

no test coverage detected