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