支持内容脚本中的所有 google 域

2024-02-18

我正在制作一个内容脚本,对谷歌结果网页执行某些操作。

下面的行在manifest.json无效。

“匹配”:[“https://www.google.*/*”]

由于清单.json 中的上述行而导致的错误是:

“content_scripts[0].matches[0]”的值无效:主机通配符无效。

我想在 google.com、google.co.in、google.de 等各个域上运行该脚本。如何实现这一点?


TLD 中不允许使用通配符匹配模式 https://developer.chrome.com/extensions/match_patterns.html.

谷歌已经发布了支持的域列表 http://www.google.com/supported_domains。每个域都放在单独的行上,看起来像.google.com。您可以使用此列表来生成有效的匹配模式,例如(我使用过www作为子域,例如):

"matches": [
    "http://www.google.com/*", "https://www.google.com/*",
    "http://www.google.ad/*", "https://www.google.ad/*",
    "http://www.google.ae/*", "https://www.google.ae/*",
    "http://www.google.com.af/*", "https://www.google.com.af/*",
    "http://www.google.com.ag/*", "https://www.google.com.ag/*",
    "http://www.google.com.ai/*", "https://www.google.com.ai/*",
    "http://www.google.am/*", "https://www.google.am/*",
    "http://www.google.co.ao/*", "https://www.google.co.ao/*",
    "http://www.google.com.ar/*", "https://www.google.com.ar/*",
    "http://www.google.as/*", "https://www.google.as/*",
    "http://www.google.at/*", "https://www.google.at/*",
    "http://www.google.com.au/*", "https://www.google.com.au/*",
    "http://www.google.az/*", "https://www.google.az/*",
    "http://www.google.ba/*", "https://www.google.ba/*",
    "http://www.google.com.bd/*", "https://www.google.com.bd/*",
    "http://www.google.be/*", "https://www.google.be/*",
    "http://www.google.bf/*", "https://www.google.bf/*",
    "http://www.google.bg/*", "https://www.google.bg/*",
    "http://www.google.com.bh/*", "https://www.google.com.bh/*",
    "http://www.google.bi/*", "https://www.google.bi/*",
    "http://www.google.bj/*", "https://www.google.bj/*",
    "http://www.google.com.bn/*", "https://www.google.com.bn/*",
    "http://www.google.com.bo/*", "https://www.google.com.bo/*",
    "http://www.google.com.br/*", "https://www.google.com.br/*",
    "http://www.google.bs/*", "https://www.google.bs/*",
    "http://www.google.co.bw/*", "https://www.google.co.bw/*",
    "http://www.google.by/*", "https://www.google.by/*",
    "http://www.google.com.bz/*", "https://www.google.com.bz/*",
    "http://www.google.ca/*", "https://www.google.ca/*",
    "http://www.google.cd/*", "https://www.google.cd/*",
    "http://www.google.cf/*", "https://www.google.cf/*",
    "http://www.google.cg/*", "https://www.google.cg/*",
    "http://www.google.ch/*", "https://www.google.ch/*",
    "http://www.google.ci/*", "https://www.google.ci/*",
    "http://www.google.co.ck/*", "https://www.google.co.ck/*",
    "http://www.google.cl/*", "https://www.google.cl/*",
    "http://www.google.cm/*", "https://www.google.cm/*",
    "http://www.google.cn/*", "https://www.google.cn/*",
    "http://www.google.com.co/*", "https://www.google.com.co/*",
    "http://www.google.co.cr/*", "https://www.google.co.cr/*",
    "http://www.google.com.cu/*", "https://www.google.com.cu/*",
    "http://www.google.cv/*", "https://www.google.cv/*",
    "http://www.google.com.cy/*", "https://www.google.com.cy/*",
    "http://www.google.cz/*", "https://www.google.cz/*",
    "http://www.google.de/*", "https://www.google.de/*",
    "http://www.google.dj/*", "https://www.google.dj/*",
    "http://www.google.dk/*", "https://www.google.dk/*",
    "http://www.google.dm/*", "https://www.google.dm/*",
    "http://www.google.com.do/*", "https://www.google.com.do/*",
    "http://www.google.dz/*", "https://www.google.dz/*",
    "http://www.google.com.ec/*", "https://www.google.com.ec/*",
    "http://www.google.ee/*", "https://www.google.ee/*",
    "http://www.google.com.eg/*", "https://www.google.com.eg/*",
    "http://www.google.es/*", "https://www.google.es/*",
    "http://www.google.com.et/*", "https://www.google.com.et/*",
    "http://www.google.fi/*", "https://www.google.fi/*",
    "http://www.google.com.fj/*", "https://www.google.com.fj/*",
    "http://www.google.fm/*", "https://www.google.fm/*",
    "http://www.google.fr/*", "https://www.google.fr/*",
    "http://www.google.ga/*", "https://www.google.ga/*",
    "http://www.google.ge/*", "https://www.google.ge/*",
    "http://www.google.gg/*", "https://www.google.gg/*",
    "http://www.google.com.gh/*", "https://www.google.com.gh/*",
    "http://www.google.com.gi/*", "https://www.google.com.gi/*",
    "http://www.google.gl/*", "https://www.google.gl/*",
    "http://www.google.gm/*", "https://www.google.gm/*",
    "http://www.google.gp/*", "https://www.google.gp/*",
    "http://www.google.gr/*", "https://www.google.gr/*",
    "http://www.google.com.gt/*", "https://www.google.com.gt/*",
    "http://www.google.gy/*", "https://www.google.gy/*",
    "http://www.google.com.hk/*", "https://www.google.com.hk/*",
    "http://www.google.hn/*", "https://www.google.hn/*",
    "http://www.google.hr/*", "https://www.google.hr/*",
    "http://www.google.ht/*", "https://www.google.ht/*",
    "http://www.google.hu/*", "https://www.google.hu/*",
    "http://www.google.co.id/*", "https://www.google.co.id/*",
    "http://www.google.ie/*", "https://www.google.ie/*",
    "http://www.google.co.il/*", "https://www.google.co.il/*",
    "http://www.google.im/*", "https://www.google.im/*",
    "http://www.google.co.in/*", "https://www.google.co.in/*",
    "http://www.google.iq/*", "https://www.google.iq/*",
    "http://www.google.is/*", "https://www.google.is/*",
    "http://www.google.it/*", "https://www.google.it/*",
    "http://www.google.je/*", "https://www.google.je/*",
    "http://www.google.com.jm/*", "https://www.google.com.jm/*",
    "http://www.google.jo/*", "https://www.google.jo/*",
    "http://www.google.co.jp/*", "https://www.google.co.jp/*",
    "http://www.google.co.ke/*", "https://www.google.co.ke/*",
    "http://www.google.com.kh/*", "https://www.google.com.kh/*",
    "http://www.google.ki/*", "https://www.google.ki/*",
    "http://www.google.kg/*", "https://www.google.kg/*",
    "http://www.google.co.kr/*", "https://www.google.co.kr/*",
    "http://www.google.com.kw/*", "https://www.google.com.kw/*",
    "http://www.google.kz/*", "https://www.google.kz/*",
    "http://www.google.la/*", "https://www.google.la/*",
    "http://www.google.com.lb/*", "https://www.google.com.lb/*",
    "http://www.google.li/*", "https://www.google.li/*",
    "http://www.google.lk/*", "https://www.google.lk/*",
    "http://www.google.co.ls/*", "https://www.google.co.ls/*",
    "http://www.google.lt/*", "https://www.google.lt/*",
    "http://www.google.lu/*", "https://www.google.lu/*",
    "http://www.google.lv/*", "https://www.google.lv/*",
    "http://www.google.com.ly/*", "https://www.google.com.ly/*",
    "http://www.google.co.ma/*", "https://www.google.co.ma/*",
    "http://www.google.md/*", "https://www.google.md/*",
    "http://www.google.me/*", "https://www.google.me/*",
    "http://www.google.mg/*", "https://www.google.mg/*",
    "http://www.google.mk/*", "https://www.google.mk/*",
    "http://www.google.ml/*", "https://www.google.ml/*",
    "http://www.google.mn/*", "https://www.google.mn/*",
    "http://www.google.ms/*", "https://www.google.ms/*",
    "http://www.google.com.mt/*", "https://www.google.com.mt/*",
    "http://www.google.mu/*", "https://www.google.mu/*",
    "http://www.google.mv/*", "https://www.google.mv/*",
    "http://www.google.mw/*", "https://www.google.mw/*",
    "http://www.google.com.mx/*", "https://www.google.com.mx/*",
    "http://www.google.com.my/*", "https://www.google.com.my/*",
    "http://www.google.co.mz/*", "https://www.google.co.mz/*",
    "http://www.google.com.na/*", "https://www.google.com.na/*",
    "http://www.google.com.nf/*", "https://www.google.com.nf/*",
    "http://www.google.com.ng/*", "https://www.google.com.ng/*",
    "http://www.google.com.ni/*", "https://www.google.com.ni/*",
    "http://www.google.ne/*", "https://www.google.ne/*",
    "http://www.google.nl/*", "https://www.google.nl/*",
    "http://www.google.no/*", "https://www.google.no/*",
    "http://www.google.com.np/*", "https://www.google.com.np/*",
    "http://www.google.nr/*", "https://www.google.nr/*",
    "http://www.google.nu/*", "https://www.google.nu/*",
    "http://www.google.co.nz/*", "https://www.google.co.nz/*",
    "http://www.google.com.om/*", "https://www.google.com.om/*",
    "http://www.google.com.pa/*", "https://www.google.com.pa/*",
    "http://www.google.com.pe/*", "https://www.google.com.pe/*",
    "http://www.google.com.ph/*", "https://www.google.com.ph/*",
    "http://www.google.com.pk/*", "https://www.google.com.pk/*",
    "http://www.google.pl/*", "https://www.google.pl/*",
    "http://www.google.pn/*", "https://www.google.pn/*",
    "http://www.google.com.pr/*", "https://www.google.com.pr/*",
    "http://www.google.ps/*", "https://www.google.ps/*",
    "http://www.google.pt/*", "https://www.google.pt/*",
    "http://www.google.com.py/*", "https://www.google.com.py/*",
    "http://www.google.com.qa/*", "https://www.google.com.qa/*",
    "http://www.google.ro/*", "https://www.google.ro/*",
    "http://www.google.ru/*", "https://www.google.ru/*",
    "http://www.google.rw/*", "https://www.google.rw/*",
    "http://www.google.com.sa/*", "https://www.google.com.sa/*",
    "http://www.google.com.sb/*", "https://www.google.com.sb/*",
    "http://www.google.sc/*", "https://www.google.sc/*",
    "http://www.google.se/*", "https://www.google.se/*",
    "http://www.google.com.sg/*", "https://www.google.com.sg/*",
    "http://www.google.sh/*", "https://www.google.sh/*",
    "http://www.google.si/*", "https://www.google.si/*",
    "http://www.google.sk/*", "https://www.google.sk/*",
    "http://www.google.com.sl/*", "https://www.google.com.sl/*",
    "http://www.google.sn/*", "https://www.google.sn/*",
    "http://www.google.so/*", "https://www.google.so/*",
    "http://www.google.sm/*", "https://www.google.sm/*",
    "http://www.google.st/*", "https://www.google.st/*",
    "http://www.google.com.sv/*", "https://www.google.com.sv/*",
    "http://www.google.td/*", "https://www.google.td/*",
    "http://www.google.tg/*", "https://www.google.tg/*",
    "http://www.google.co.th/*", "https://www.google.co.th/*",
    "http://www.google.com.tj/*", "https://www.google.com.tj/*",
    "http://www.google.tk/*", "https://www.google.tk/*",
    "http://www.google.tl/*", "https://www.google.tl/*",
    "http://www.google.tm/*", "https://www.google.tm/*",
    "http://www.google.tn/*", "https://www.google.tn/*",
    "http://www.google.to/*", "https://www.google.to/*",
    "http://www.google.com.tr/*", "https://www.google.com.tr/*",
    "http://www.google.tt/*", "https://www.google.tt/*",
    "http://www.google.com.tw/*", "https://www.google.com.tw/*",
    "http://www.google.co.tz/*", "https://www.google.co.tz/*",
    "http://www.google.com.ua/*", "https://www.google.com.ua/*",
    "http://www.google.co.ug/*", "https://www.google.co.ug/*",
    "http://www.google.co.uk/*", "https://www.google.co.uk/*",
    "http://www.google.com.uy/*", "https://www.google.com.uy/*",
    "http://www.google.co.uz/*", "https://www.google.co.uz/*",
    "http://www.google.com.vc/*", "https://www.google.com.vc/*",
    "http://www.google.co.ve/*", "https://www.google.co.ve/*",
    "http://www.google.vg/*", "https://www.google.vg/*",
    "http://www.google.co.vi/*", "https://www.google.co.vi/*",
    "http://www.google.com.vn/*", "https://www.google.com.vn/*",
    "http://www.google.vu/*", "https://www.google.vu/*",
    "http://www.google.ws/*", "https://www.google.ws/*",
    "http://www.google.rs/*", "https://www.google.rs/*",
    "http://www.google.co.za/*", "https://www.google.co.za/*",
    "http://www.google.co.zm/*", "https://www.google.co.zm/*",
    "http://www.google.co.zw/*", "https://www.google.co.zw/*",
    "http://www.google.cat/*", "https://www.google.cat/*"
]

代替http:// and https://, *://可以使用。请注意,存在更多搜索门户:

  • https://crypted.google.com/ https://encrypted.google.com/ -> "https://encrypted.google.com/*"
  • https://ipv6.google.com/ https://ipv6.google.com/ -> "https://ipv6.google.com/*"
  • 特定的搜索引擎,例如maps http://maps.google.com/, news http://news.google.com/.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

支持内容脚本中的所有 google 域 的相关文章

随机推荐

  • 为什么我的node_modules中有@angular/core,但仍然出现此错误?

    我从 angular io 下载了一个示例项目 从这里https angular io generated zips cli quickstart cli quickstart zip https angular io generated
  • Flutter:如何更新 firestore 中数组中的数组

    消防银行 https i stack imgur com 5R9Qz png 我需要更新索引数组 0 中的状态字段 其中时间 8 00 我需要将此状态传递给 0 只是该数组位于图像中的矩阵内被视为计时器 如何通过将 status 1 字段更
  • CsvHelper - 在同一 CSV 中读取不同的记录类型

    我正在尝试从具有以下结构的 CSV 文件中读取两种类型的记录 PlaceName Longitude Latitude Elevation NameString 123 456 56 78 40 Date Count 1 1 2012 1
  • 确定一个数组是否包含在另一个数组中

    如何确定一个数组是否包含在另一个数组中 逐个元素且按顺序 我已经在 MSVS 2010 中编写了下面的程序 但不太确定如何完成确定一个数组是否出现在另一个数组中的布尔函数 void isContained int ar1 int ar2 i
  • x&&y||z 是如何计算的?

    Given int x 1 y 2 z 您能解释一下为什么结果是 x y z is 1 x y 1 x y z 1 x y z 相当于 x y z if x 1 and y 2 then x y is 1 2这是true true这是tru
  • 如何在 Neo4j Cypher 上使字符串包含过滤器

    我需要在 Neo4J 中创建一个包含过滤器的字符串 这个想法很简单 一个很好的例子是 我需要从人员数据库中检索姓名中包含汽车子字符串的所有人员 我怎样才能做到这一点 作为附加更新 从 neo4j 3 0 开始 它可能更易于使用 MATCH
  • DirectX/OpenGL 中的三角形绘制顺序

    3D API 中绘制三角形的顺序是否保证与其在索引缓冲区中的顺序相同 例如 如果我在一次绘制调用中有两个重叠的三角形 并且禁用深度测试 那么第一个或第二个三角形最终是否可见 或者我是否需要发出单独的绘制调用以确保第二个三角形出现在第一个三角
  • Zend Select 具有自连接覆盖字段

    帖子和评论存储在同一个表中 因此 为了获取每个帖子及其评论 我们这样做 posts this gt select gt setIntegrityCheck false gt from array post gt Posts array gt
  • 第一个元素偏移量

    结构的第一个元素的偏移量为 0 是否是保证 为了更准确 让我们考虑一下 struct foo int a double b struct foo ptr malloc sizeof struct foo int int ptr ptr gt
  • 您是否使用 TestInitialize 或测试类构造函数来准备每个测试?为什么?

    这个问题涉及使用 MSTest 在 Visual Studio 中进行单元测试 这很重要 因为 MSTest 的执行顺序 http blogs msdn com nnaderi archive 2007 02 17 explaining e
  • 如何修复轮询时的 Cucumber 期望错误?

    我有帮手sign in登录用户 我正在尝试使用一种新方法来确保用户使用轮询登录 def sign in user password 111111 click button sign in btn eventually 5 page shou
  • 在plsql中编写函数

    我正在查询数据库 需要解析其中一个字段以获取特定值 使用字符串函数 所以我认为最好为其编写一个函数 我以前从未在 plsql 中编写过函数 所以我决定看一些示例 我得到了一个简单的 square 函数的副本 它接受一个数字并返回它的平方 但
  • 通过 DBRef 数组查找文档

    解决方案可能就在我面前 但我还没有找到它 我的问题是我需要查找包含指定 DBRef 的所有文档 这是要搜索的集合的结构 id ObjectId 4e2d4892580fd602eb000003 date added ISODate 2011
  • Ruby 有哪些 Python 没有的功能,反之亦然?

    Locked 这个问题及其答案是locked help locked posts因为这个问题是题外话 但却具有历史意义 目前不接受新的答案或互动 关于 Python 与 Ruby 的讨论有很多 我都发现它们完全没有帮助 因为它们都围绕着为什
  • 如何使用 Django / Python 从 RESTful Web 服务中使用 XML?

    我应该使用 PyXML 还是标准库中的内容 ElementTree 作为标准 Python 库的一部分提供 ElementTree 是纯 python 而 cElementTree 是更快的 C 实现 Try to use the C im
  • 如何在 WiX 片段中获得编辑注册表 CLSID 的提升权限

    我正在尝试将 Windows 桌面搜索设置为使用系统默认过滤器 nlhtml dll 之外的不同 html 过滤器 当我查找 PersistentHandler 时 HKEY LOCAL MACHINE SOFTWARE Classes h
  • ASP.NET Core MVC 视图组件

    在 ASP NET Core MVC 以前称为 MVC 6 中 有一个称为视图组件的新功能区域 它似乎是部分视图的更好替代方案 我看过以下内容查看组件示例 http www asp net vnext overview aspnet vne
  • 在 AppDelegate 之外使用 NIB 创建 UITabBarController?

    对于 iOS 编程来说 我还是个新手 尽管进行了大量的研究 但我还是遇到了另一个障碍 我想要实现的 我想要一个当我从主 UI 导航时加载的 UITabBarController 我还想使用 NIB 来定义其属性 我能找到的所有示例都将 UI
  • Gstreamer视频输出位置跟踪和寻找

    我正在使用 gstreamer gst launch 捕获相机并将流保存为视频和图像帧 管道的问题是 当管道完成 通过中断 视频记录时 它不能支持位置跟踪和查找 因此 视频在 vlc 播放器中播放 长度未知 我认为问题出在管道本身 如何实现
  • 支持内容脚本中的所有 google 域

    我正在制作一个内容脚本 对谷歌结果网页执行某些操作 下面的行在manifest json无效 匹配 https www google 由于清单 json 中的上述行而导致的错误是 content scripts 0 matches 0 的值