为简单起见,我有一个content_script,其中包含一个清单
"content_scripts": [
{
"run_at": "document_start",
"match_about_blank": true,
"all_frames": true,
"matches": ["<all_urls>"],
"css": ["assets/css/content_script.css"],
"js": ["js/vendor.js", "js/content_script.js"]
}
],
"permissions": [
"tabs",
"storage",
"<all_urls>"
]
但是在导航至以下Chrome网址时(将其复制/粘贴到地址栏中)
(fyi:这是一只可爱的狗的照片)
data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxMSEhUTExMWFhUVGBgXFhgVFxUXFxYXGBYXGBUXFxUYHSggGBolHRUVITEhJSkrLi4uGB8zODMtNygtLisBCgoKDg0OGhAQGi0lHyUtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLf/AABEIAL8BCAMBIgACEQEDEQH/xAAcAAACAgMBAQAAAAAAAAAAAAAEBQMGAQIHAAj/xAA6EAABAwIEAwUHAwQCAwEBAAABAAIRAyEEEjFBBVFhBiJxgZETMqGxwdHwB+HxFCNCUjNicoKSohX/xAAZAQADAQEBAAAAAAAAAAAAAAABAgMABAX/xAAiEQACAgIDAAIDAQAAAAAAAAAAAQIRITEDEkEyURNxsSL/2gAMAwEAAhEDEQA/AImBSBaMKkheOzymYWS5eDSslqZFY2D1HIVzkVUCCqtIVEURFUN1A+rCkqFDvTFYOiOo9YJWSFq9KPJm7SpKRusYXDuqGGglWjhHY2pVE3ncaWO4R6t6G44tiamVu58BP+IdjK1Mj2ZD+bZukeM4bXZ71J4GxgkeoQaa2LPjf0QvqQFgOQ73RrYrX2tliSwF5lqVAKi3a5AezYrQlbqNyIxsCtsyHDluHLUYllYLlHmXpQoxsXLQlYcVG5yKFZM0rcIdjlMEXoeGyWkFNChYVISliUmzRxusyo5WWlY5yReXmrKwbGlKmUWygs0KZKY0MOU0eOycOIDbh1k4fom7cMtKtCFVcaOhQQirUEpxTbwn+MEJFi6iSSoWUUhfUCheFJVctW4Zztw0dfsh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BtYc/wAunFKmB4Hw1/dRlLsx0qJ8NS/lOaVgEBhKEXR1ES76I6QNj7ARlEJth3JJhKsJnRqhVixJIZBcy/VDhY/5Lib2XRGV0r7VU2voOzCYR5EpRES8Pn2qL2WAUTxSmGvOUgtm0IEuXBRyNUyRzl5RyvJkayHEhdm/RjhQp4Y1Yu86nl0XI6ND2j2sGriB6lfSPZ3Aihh6dMbNHyXZBWzqGJQtZ0Ih5QGKqKkmFAGKfMpVjmyEwrlLMU6VFlUJ6ndcpQ6drqTFUwQgRULTB0SrBnklqn1SXHhxJ+g+asLocEHXpStKNmi6K2cIGgueT0JVZxdCTa66E+gNwg34UToOegU6ofsc+/8A5ExAvv8AnitDwWHe8Y6TPkVf/wCiZu0fFC41obYC4jSE/ahaspbXPYcpdF4E8tz8PNT4mgSMwki9xblNvRWLE8ObUjOASbnaw6+iixGDAblFm2/dDsjdSoVCC/KwyI36KEYOo7b+FZsHwkSXDp8hKPbggeg2+CbubqUY4N4IYCZmOnVNeHcIqZgS6D9LpvRwAdVOnc+p+wT+lhQCPj8/ss5YAkJMHwMg3NhET11+Sd4XDxGXQXMWmUTiaU2G8eg/hYpUwJEGR1tCk3ZRBVFnpsjqLZsB+yGoNMQi6SaKFYVTMC+3zRmA+aUmoS6Bp8ym2DbIEahG7ZtIaUmEI7DvGkoOjVstnVeidYAM6Oshb4yjnY5p3EIDD1YumDakqieCbPnztNgDRrvZtJISmFcP1NpZcVPMKogrjqmcvKqkYheWyysTP//Z
当页面加载时,content_script永远不会真正运行。
脚本在我测试过的所有其他页面上运行...除了数据URL。