📅  最后修改于: 2022-03-11 14:55:42.900000             🧑  作者: Mango
chrome.tabs.query({active: true, lastFocusedWindow: true}, tabs => {
let url = tabs[0].url;
// use `url` here inside the callback because it's asynchronous!
});
//This requires that you request access to the chrome.tabs API in your extension manifest:
"permissions": [ ...
"tabs"
]