Chrome扩展程序:获取当前个人资料的用户名 [英] Chrome extension: get current Profile's Person's username
本文介绍了Chrome扩展程序:获取当前个人资料的用户名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在为Chrome编写一个简单的扩展程序。
用户可以选择设置配置文件名称
如何在扩展名中使用lan p>
这是一个非常简单的扩展
manifest.json
{
manifest_version:2,
name:..description...
$ bbackground:{
scripts:[background.js]
},
...
}
background.js
//如何获取配置文件名称?
// chrome.what.user.profile.name ??
解决方案
有趣的问题,但恐怕答案是目前没有API来访问该信息。
I'm writing a simple extension for Chrome.
There's an option for user to set a Profile Name
How to get that name "lan" in the extension?
It's a really simple extension
manifest.json
{
"manifest_version": 2,
"name": .."description"...
...
"background": {
"scripts": ["background.js"]
},
...
}
background.js
// how to get the profile name here?
// chrome.what.user.profile.name??
解决方案
Interesting question, but I'm afraid the answer is that currently there is no API to access that information.
这篇关于Chrome扩展程序:获取当前个人资料的用户名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文