Chrome extension: 获取当前个人资料的用户名
Chrome extension: get current Profile's Person's username
我正在为 Chrome 编写一个简单的扩展。
用户可以选择设置配置文件名称
如何在扩展程序中获取该名称 "lan"?
这是一个非常简单的扩展
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??
这个问题很有趣,但恐怕答案是目前没有 API 可以访问该信息。
我正在为 Chrome 编写一个简单的扩展。
用户可以选择设置配置文件名称
如何在扩展程序中获取该名称 "lan"?
这是一个非常简单的扩展
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??
这个问题很有趣,但恐怕答案是目前没有 API 可以访问该信息。