[英]Inject a content script into an iframe, within an action popup, of a different extension?
I need to be able to inject a content script into an iframe that is within an action's popup.html of another extension. 我需要能够将内容脚本注入到另一个扩展的动作的popup.html中的iframe中。
Previously, before an update to this extension in question, the extension injected the iframe into the active tab. 以前,在对该相关扩展程序进行更新之前,该扩展程序会将iframe注入到活动标签中。 I was able to configure my manifest like this:
我可以这样配置清单:
"content_scripts": [{
"matches": ["https://*.domain.com/*"],
"js": ["content.js"],
"all_frames": true
}],
It worked fine, the content script was injected into the iframe. 一切正常,将内容脚本注入了iframe。 Now this extension has the iframe in the action's popup.html and I can't get this to work.
现在,此扩展程序在动作的popup.html中包含了iframe,但我无法正常工作。
Is there any way to accomplish this? 有什么办法可以做到这一点?
In general, you can't do this because chrome-extension:
is not/no-longer a valid scheme . 通常,您不能执行此操作,因为
chrome-extension:
不是/不再是有效的scheme 。
However, if you can target the popup.html
without using wildcards, you might be able to get to work by setting a "bad flag" in the Chrome://flags
page . 不过,如果你可以针对
popup.html
不使用通配符,你也许可以得到由工作设定在一个“坏标志” Chrome://flags
页 。
Obviously, this will only work for your own personal browser. 显然,这仅适用于您自己的个人浏览器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.