Bug #15058
Use content_scripts instead of custom code
0%
Description
See https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/content_scripts
The code in background.js to inject scripts in already opened tabs looks unnecessary, and this should use the manifest instead.
Subtasks
History
#1 Updated by sajolida 2017-12-22 18:32:37
- Assignee changed from sajolida to uzairfarooq
#2 Updated by uzairfarooq 2017-12-28 06:37:25
sajolida wrote:
> See https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/content_scripts
>
> The code in background.js to inject scripts in already opened tabs looks unnecessary, and this should use the manifest instead.
When extension is installed, it does not automatically inject scripts in already opened tabs. To inject script in already opened tabs, we must inject them programmatically. See this stackoverlfow question https://stackoverflow.com/questions/10994324/chrome-extension-content-script-re-injection-after-upgrade-or-install
#3 Updated by uzairfarooq 2017-12-28 06:40:15
- Assignee changed from uzairfarooq to sajolida
#4 Updated by sajolida 2017-12-29 17:08:19
- QA Check set to Dev Needed
So we should add a comment about this in the code.
#5 Updated by sajolida 2018-01-17 17:42:37
- Status changed from Confirmed to Resolved
- Assignee deleted (
sajolida) - QA Check deleted (
Dev Needed)
Done in 2cdd52f.