Skip to content

Commit e9bba47

Browse files
committed
Readme: clarify instructions
1 parent c01e584 commit e9bba47

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

readme.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,26 @@ npm install --save webext-dynamic-content-scripts
1414

1515
### Plain files
1616

17-
1. Include the file `dist/webext-dynamic-content-scripts.js` in your manifest.json, both as a `background` script and `content_script`.
17+
1. In your `manifest.json`, include the file as background and as content script:
18+
19+
```js
20+
{
21+
"background": {
22+
"scripts": [
23+
"dist/webext-dynamic-content-scripts.js"
24+
]
25+
},
26+
"content_scripts": [
27+
{
28+
"js": [
29+
"dist/webext-dynamic-content-scripts.js",
30+
"content.js"
31+
]
32+
}
33+
]
34+
}
35+
```
36+
1837
2. In your background script **only**, run `injectContentScripts()`
1938

2039
### With a bundler

0 commit comments

Comments
 (0)