📅  最后修改于: 2022-03-11 15:01:29.637000             🧑  作者: Mango
chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) {
var tab = tabs[0];
var url = new URL(tab.url)
var domain = url.hostname
// `domain` now has a value like 'example.com'
})