MCPcopy Create free account
hub / github.com/andreadev-it/stacking-contexts-inspector / injectScript

Function injectScript

src/scripts/background.js:79–84  ·  view source on GitHub ↗

* Inject the content script into a tab

(tabId)

Source from the content-addressed store, hash-verified

77 * Inject the content script into a tab
78 */
79function injectScript(tabId) {
80 return chrome.scripting.executeScript({
81 target: {tabId},
82 files: ['/scripts/content.js'],
83 });
84}
85
86/**
87 * Get a script connection, and if there is no script associated with the tab, it injects it.

Callers 1

getScriptConnectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected