![](/img/trans.png)
[英]Chrome extension: How to respond to the action from “popup” in the content script?
[英]Inject a content script into an iframe, within an action popup, of a different extension?
我需要能夠將內容腳本注入到另一個擴展的動作的popup.html中的iframe中。
以前,在對該相關擴展程序進行更新之前,該擴展程序會將iframe注入到活動標簽中。 我可以這樣配置清單:
"content_scripts": [{
"matches": ["https://*.domain.com/*"],
"js": ["content.js"],
"all_frames": true
}],
一切正常,將內容腳本注入了iframe。 現在,此擴展程序在動作的popup.html中包含了iframe,但我無法正常工作。
有什么辦法可以做到這一點?
通常,您不能執行此操作,因為chrome-extension:
不是/不再是有效的scheme 。
不過,如果你可以針對popup.html
不使用通配符,你也許可以得到由工作設定在一個“壞標志” Chrome://flags
頁 。
顯然,這僅適用於您自己的個人瀏覽器。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.