检查并使用网站网页 chrome 扩展中的 jQuery / angular 对象

check and use jQuery / angular object in chrome extension from the website webpage

我想通过查看网站上的 window.jQuerywindow.angular 属性 来检查是否有任何网站正在使用 jQuery/Angular。 我有同时使用 angular 和 jQuery 的测试网站。但是在 chrome 扩展中我无法访问 window.angular 但可以访问 content-script 中运行的 window 对象在页面上下文中。 出于安全考虑,我的内容脚本无法访问我页面上的 Javascript。 我想知道是否有办法访问我的扩展内容脚本中的所有 window 对象?

最后,创建了一个 plugin 来判断网站是否在 AngularJs 上 运行。如果正在使用 pascalprecht.translate,这可以更改 localeLinkcode 你可以改变并从中学习