Is it possible to have two content scripts run on two separate pages?

后端 未结 2 1412
-上瘾入骨i
-上瘾入骨i 2021-01-16 01:27

Say I have two content scripts, codeA.js and codeB.js. I am wondering if it possible to run codeA.js on http://www.example.com and hav

2条回答
  •  北恋
    北恋 (楼主)
    2021-01-16 02:13

    Note that content_scripts is an array:

    "content_scripts": [
        {
            "matches": ["http://www.example.com/*"],
            "js": ["codeA.js"]
        },
        {
            "matches": ["http://www.domain.com/*"],
            "js": ["codeB.js"]
        }
    ]
    

提交回复
热议问题