在 Page-Mod 中使用远程内容脚本文件/Javascript
有没有办法通过 page-mod API?
我正在尝试构建一些简单的插件供我自己使用,以自动化一些重复的事情。因为我要修改的页面会不时发生变化,并且我需要相应地更新“内容脚本”javascript,所以如果我只需在我的服务器上编辑它并且插件/扩展程序将再次工作,那就太好了无需编辑和重新打包 xpi。我很确定我能够组合一些东西来实现这一点,但如果有任何简单的方法可以做到这一点,我洗耳恭听:)
Is there any way to easily use a remote javascript file as a content script with the page-mod API?
I am trying to build some simple addons for my own use to automate some repetitive stuff. Because the pages I will be modding change from time to time, and I will need to be updating the "content script" javascript accordingly, it would be nice if I only had to edit it on my server and the addon/extension would work again without editing and repacking the xpi. I'm pretty sure I would be able to hack something together that will accomplish this, but if there is any easy way to do it I'm all ears :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
内容脚本本身不应该是远程脚本,否则会存在安全漏洞。但内容脚本可以将远程脚本插入网页:
The content script itself should never be a remote script, that would be a security vulnerability. But the content script can insert a remote script into the web page: