Inject chrome.* to content scripts
This commit is contained in:
parent
d8db695712
commit
f5b430d9e1
4 changed files with 56 additions and 33 deletions
|
@ -123,7 +123,10 @@ const injectContentScripts = function (manifest) {
|
|||
if (contentScripts[manifest.name] || !manifest.content_scripts) return
|
||||
|
||||
const readArrayOfFiles = function (relativePath) {
|
||||
return String(fs.readFileSync(path.join(manifest.srcDirectory, relativePath)))
|
||||
return {
|
||||
url: `chrome-extension://${manifest.hostname}/${relativePath}`,
|
||||
code: String(fs.readFileSync(path.join(manifest.srcDirectory, relativePath)))
|
||||
}
|
||||
}
|
||||
|
||||
const contentScriptToEntry = function (script) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue