gpt4 book ai didi

javascript - 火狐插件 SDK : Attache a JS code to all the frames of a page

转载 作者:行者123 更新时间:2023-11-28 07:06:00 24 4
gpt4 key购买 nike

我想将 JavaScript 代码注入(inject)域的主页及其所有框架。 tabs.activeTab.attach 和 pageMod contentScript 只是将代码注入(inject)主页而不是其子框架。有没有办法在页面的所有框架中递归地注入(inject)并运行JS代码?

最佳答案

其实我发现pageMod默认在页面的所有框架中附加了JS代码。因此,使用 pageMod 并指定您的 contentScript 就足够了。

关于javascript - 火狐插件 SDK : Attache a JS code to all the frames of a page,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31713002/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com