event_rules

event_rules 資訊清單屬性提供用於新增規則的機制,可用於攔截、封鎖或 使用 declarativeWebRequest 修改傳輸中的網路要求,或根據 而無需取得使用 declarativeContent

將規則從 JavaScript 轉譯為資訊清單

以下說明如何在目前網頁上有影片 CSS 標記時,顯示網頁動作的規則 javascript:

chrome.declarativeContent.onPageChanged.addRules([{
  actions: [
    new chrome.declarativeContent.ShowPageAction()
  ],
  conditions: