0
我正在尝试创建我的第一个Chrome扩展。创建Chrome扩展程序以隐藏DIV显示:无;在特定页面
它基本上是一个特定元素的adblocker,在这种情况下 - Facebook评论部分。
它适用于all_urls,但不适用于该特定域。
清单文件:
{
"name": "My extension",
"version": "1.0",
"manifest_version": 2,
"content_scripts": [
{
"matches": ["http://visir.is/*"], //where your script should be injected
"css": ["style.css"] //the name of the file to be injected
}
]
}
的style.css文件:
.fbcomment { 显示:无; }
任何想法如何更正“匹配”?
我试图*://visir.is/*
为https://developer.chrome.com/extensions/match_patterns规定,但它仅与all_urls
非常感谢! 您的权利。我指定的div在Facebook里面。 但是,我发现页面内有另一个div,可以用来阻止该元素。 非常感谢。 – Viktor