【发布时间】:2021-05-27 16:22:06
【问题描述】:
我的任务是创建一个 Google Chrome 扩展程序。到目前为止,一切正常。但是,我希望能够使用多个后台脚本(我的意思是"background" : {"scripts" : ["background.js"]},,如果我说的不清楚的话)而不是创建多个扩展。这可能吗?
问候,
【问题讨论】:
-
为什么要这样做?由于
background.scripts是一个数组,我希望它可以工作。你试过什么? -
还没试过。就是想知道能不能实现。如何测试
background:{"scripts": ["background.js","bg.js"]},是否有效?另外,我有一个像if the keyword is foo, do this; if the keyword is bar, do that这样的结构。这可能吗? -
似乎比在 Stack Overflow 上提问更容易。