Current handle sender.tab for background pages
This commit is contained in:
parent
dd804d7432
commit
2431d886bf
4 changed files with 51 additions and 24 deletions
|
@ -13,7 +13,7 @@ const matchesPattern = function (pattern) {
|
|||
// Run the code with chrome API integrated.
|
||||
const runContentScript = function (extensionId, url, code) {
|
||||
const context = {}
|
||||
require('./chrome-api').injectTo(extensionId, context)
|
||||
require('./chrome-api').injectTo(extensionId, false, context)
|
||||
const wrapper = `(function (chrome) {\n ${code}\n })`
|
||||
const compiledWrapper = runInThisContext(wrapper, {
|
||||
filename: url,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue