比如:
xxx 文件转换前
/**
* 从 chrome 的本地存储区域检索对象
* @param {string} key
*/
const getObjectFromLocalStorage = async function(key) {
return new Promise((resolve, reject) => {
try {
chrome.storage.local.get(key, function(value) {
resolve(value[key]);
});
} catch (ex) {
reject(ex);
}
});
};
xxx 文件转换后
/**
* Retrieve object from Chrome's Local StorageArea
* @param {string} key
*/
const getObjectFromLocalStorage = async function(key) {
return new Promise((resolve, reject) => {
try {
chrome.storage.local.get(key, function(value) {
resolve(value[key]);
});
} catch (ex) {
reject(ex);
}
});
};
1
azui999 2023-01-13 10:15:00 +08:00
自己写个,翻译可以用百度 api
|
2
iPc666 2023-01-13 13:46:22 +08:00
|
3
iPc666 2023-01-13 13:52:52 +08:00
|