Google chrome extension 如何匹配chrome插件的URL模式

Google chrome extension 如何匹配chrome插件的URL模式,google-chrome-extension,Google Chrome Extension,我正在尝试匹配URL模式,以使我的内容脚本能够运行。http://模式匹配,但是如果我转到同一个站点,除去http://,它就不会运行。我如何表示即使缺少http://也希望插件运行 以下是我的主要观点: { "name": "BrowserExtension", "version": "0.0.1", "manifest_version": 2, "description" : "Description ...", "icons": { "16": "icons/1

我正在尝试匹配URL模式,以使我的内容脚本能够运行。http://模式匹配,但是如果我转到同一个站点,除去http://,它就不会运行。我如何表示即使缺少http://也希望插件运行

以下是我的主要观点:

    {
  "name": "BrowserExtension",
  "version": "0.0.1",
  "manifest_version": 2,
  "description" : "Description ...",
  "icons": { "16": "icons/16x16.png", "48": "icons/48x48.png", "128": "icons/128x128.png" },

  "omnibox": { "keyword" : "yeah" },

  "browser_action": {
    "default_icon": {
      "19": "icons/19x19.png",
      "38": "icons/38x38.png"
    },
    "default_title": "That's the tool tip",
    "default_popup": "browseraction/popup.html"
  },

  "chrome_url_overrides" : {
    "newtab": "newtab/newtab.html"
  },

  "content_scripts": [
    {
      "matches": ["https://www.supremenewyork.com/checkout"],
      "js": ["content.js", "jquery.js"]
    },
    {
      "matches": ["*://www.supremenewyork.com/shop/*"],
      "js": ["cart.js", "jquery.js"]        
    }
  ],

   "permissions": [
    "storage"
  ],

  "devtools_page": "devtools/devtools.html"
}
当我转到此页面时,javascript不会运行:

http://www.supremenewyork.com/shop/shirts/supreme-pink-panther-denim-shirt

请发布您的清单文件。这是怎么回事?匹配项:[http://www.supremenewyork.com/shop/*, https://www.supremenewyork.com/shop/*],我用你的清单写了一个简单的扩展。当我访问//www.supremenewyork.com/shop/shirts/supreme-pink-panther-denim-shirt时,注入的脚本按预期执行。在scheme中放入*时,模式将匹配http或https。您的内容脚本将做什么?尝试删除控制台日志中的所有逻辑和打印字符串,以检查脚本是否已执行。