首页 > 解决方案 > 如何仅在我的扩展生成页面上运行内容脚本?

问题描述

如何在托管我的扩展程序的特定页面上运行内容脚本

我试过这个

 "content_scripts": [{
    "matches": ["chrome-extension://*/*", "https://*/*"],
    "js": ["script.js"],
    "all_frames": true
  }],

但它会引发错误

Invalid value for 'content_scripts[0].matches[0]': Invalid scheme.

标签: javascriptgoogle-chrome-extensionmanifest

解决方案


推荐阅读