为我糟糕的英语语法感到抱歉。
我在学习做一个镀铬的延伸。
我要检测当前选项卡url的更改。
manifest.json
"permissions": [
"tabs"
],
"background": {
"scripts": ["public/js/background.js"],
"persistent": true
}background.js
chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
console.log(tab.url);
});当我更改当前选项卡的url时,在控制台中将打印3或4个日志
我不明白这种情况。
https://stackoverflow.com/questions/26831312
复制相似问题