我尝试编写仅在*://github.com/notifications
或*://github.*.com/notifications
上运行的扩展程序(以涵盖Github Enterprise URL)。不幸的是,第二种匹配模式是the firefox docs和the google docs中的无效匹配模式之一,请参见图片:
这可能意味着我必须使用*://*/notifications
代替,然后在应用中过滤它,这看起来很痛苦,因为这意味着我必须使用比我更广泛的范围。需要。
所以我的问题是,是否有一种简单的方法来匹配我错过的这些网址?是否有理由禁止这场比赛?
App有here以防万一。
答案 0 :(得分:0)
好的,使用评论
中建议的include_globs
选项修复它
"content_scripts": [
{
"matches": [
"*://*/*"
],
"include_globs": [
"*://*github*notifications*"
],
"js": [
"browser-polyfill.js",
"button.js"
]
}
]
你似乎很奇怪你被迫做这个更一般的比赛,然后用include_globs
过滤掉,但也许这清楚表明你实际上匹配任何一个域。