代码之家  ›  专栏  ›  技术社区  ›  Dolphin

是否可以通过指定的站点或域排除google chrome扩展

  •  0
  • Dolphin  · 技术社区  · 4 年前

    现在我发现google chrome的扩展有以下几点:

    enter image description here

    单击后,在特定站点上启用,所有站点均已启用。有没有可能在指定的网站上禁用google chrome扩展?例如,我希望扩展不能在 stackoverflow.com 和 google.com ,我该怎么办?可能吗?我只是想谷歌浏览器插件现在排除一些网站。我试图将此配置添加到 manifest.json :

    "exclude_globs": [
        "://*.stackoverflow.com/*"
      ],
    

    似乎没用。这是我的 显示json :

    {
      "name" : "" ,
      "description" : "" ,
      "manifest_version" : 2 ,
      "version" : "6.4.12.1" ,
      "homepage_url" : "https://github.com/lmk123/crx-selection-translate" ,
      "content_security_policy" : "script-src 'self' 'unsafe-eval'; object-src 'self'" ,
      "incognito": "split" ,
      "icons" : {
        "128" : "/logo.png"
      } ,
      "author" : "Milk Lee <milk.lee@qq.com>" ,
      "permissions" : [
        "<all_urls>" ,
        "contextMenus" ,
        "storage" ,
        "clipboardWrite" ,
        "clipboardRead" ,
        "webRequest",
        "webRequestBlocking"
      ] ,
      "background" : {
        "scripts" : [
          "/bundle/commons3.js" ,
          "/bundle/bg.js"
        ]
      } ,
      "content_scripts" : [
        {
          "matches" : [
            "http://*/*" ,
            "https://*/*" ,
            "file:///*"
          ] ,
          "css" : [
            "/bundle/commons1.css"
          ] ,
          "js" : [
            "/bundle/commons3.js" ,
            "/bundle/commons2.js" ,
            "/bundle/commons1.js" ,
            "/bundle/content.js"
          ] ,
          "all_frames" : true ,
          "run_at" : "document_start"
        }
      ] ,
      "options_page" : "/options/index.html" ,
      "options_ui" : {
        "page" : "/options/index.html" ,
        "chrome_style" : true
      } ,
      
      "browser_action" : {
        "default_icon" : {
          "19" : "/logo.png" ,
          "38" : "/logo.png"
        } ,
        "default_popup" : "/popup/index.html"
      } ,
      "commands" : {
        "_execute_browser_action" : {
          "suggested_key" : {
            "default" : "Ctrl+Q" ,
            "mac" : "MacCtrl+Q"
          }
        } ,
        "translate" : {
          "suggested_key" : {
            "default" : "Alt+A"
          }
        }
      } ,
      "minimum_chrome_version" : "29" ,
      "web_accessible_resources" : [
        "/bundle/*.woff" ,
        "/content-scripts/web/embed/*",
        "/pdf-viewer/*"
      ]
    }
    
    0 回复  |  直到 4 年前