Skip to content

Commit

Permalink
Merge pull request #83 from airtower-luna/content-script-as-needed
Browse files Browse the repository at this point in the history
Register static content scripts only as needed
  • Loading branch information
airtower-luna authored Nov 6, 2022
2 parents 0815a0f + b21013d commit 6aa4c31
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
8 changes: 5 additions & 3 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,11 @@ async function registerContentScript(config)
"matches": ["https://*/*", "http://*/*"],
"matchAboutBlank": true,
"allFrames": true,
"js": [{
"code": code
}],
"js": [
{file: "engine.js"},
{file: "content.js"},
{code: code}
],
"runAt": "document_start"
});

Expand Down
10 changes: 0 additions & 10 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,6 @@
"persistent": false
},

"content_scripts": [
{
"matches": ["https://*/*", "http://*/*"],
"match_about_blank": true,
"all_frames": true,
"js": ["engine.js", "content.js"],
"run_at": "document_start"
}
],

"browser_specific_settings": {
"gecko": {
"id": "referer-mod@9a5ba22d-c08f-494f-86c2-e9fd04a6a42c",
Expand Down

0 comments on commit 6aa4c31

Please sign in to comment.