如何从扩展程序获取当前版本的Chrome? [英] How to get the current version of Chrome from an extension?
本文介绍了如何从扩展程序获取当前版本的Chrome?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用实验性API WebRequest为Chrome创建用户代理切换器,并且我想显示当前使用的用户代理。
I'm making a user-agent switcher for Chrome using the experimental API WebRequest, and I'd like to display the current user-agent used.
为此,我必须获得当前版本的Chrome,但我在文档中找不到任何相关内容,而我无法访问chrome ://版本页面由于安全考虑。
For that, I have to get the current version of Chrome, but I don't find anything about that in the doc and I can't access to the "chrome://version" page due to security considerations.
你有什么想法帮助我吗?
Do you have an idea to help me?
推荐答案
怎么样
window.navigator.userAgent
在您的背景页上?
这篇关于如何从扩展程序获取当前版本的Chrome?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文