如何使用chrome扩展中的存储匹配?

时间:2018-02-28 01:24:48

标签: google-chrome google-chrome-extension

我希望在选项页面中输入的网址用户执行something.js

的manifest.json:

  "content_scripts": [
    {
      "matches": [
        "https://www.google.com/*"
      ],
      "js": [
        "something.js"
      ]
    }
  ]

这样,它是硬编码的,我想让用户在Chrome扩展程序选项页面中输入所需的网址,并且输入的网址将作为matches_url保存在存储中,并且当前网页的网址与{ {1}},matches_url应该注入。

我该怎么做?

0 个答案:

没有答案