solve public functions by Claude.ai
This commit is contained in:
14
utils.js
Normal file
14
utils.js
Normal file
@@ -0,0 +1,14 @@
|
||||
function getUserInfo() {
|
||||
return new Promise((resolve) => {
|
||||
chrome.identity.getProfileUserInfo({ accountStatus: "ANY" }, (userInfo) => {
|
||||
if (chrome.runtime.lastError) {
|
||||
console.error(chrome.runtime.lastError);
|
||||
resolve(null);
|
||||
} else {
|
||||
resolve(userInfo);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
window.getUserInfo = getUserInfo;
|
||||
Reference in New Issue
Block a user