I am trying to make an extension that will console.log the URL from the chrome tab.
I keep on getting this error: Uncaught TypeError: No matching signature.
Please can someone tell me how to fix this?
Background.js:
chrome.webRequest.onCompleted.addListener(
function() {
chrome.tabs.query({active: true, lastFocusedWindow: true}, tabs => {
let ff = tabs[0].url;
console.log(ff)
}
);
}
)
Manifest.json:
"name": "Project Name",
"version": "1.0",
"description": "Description",
"permissions": [
"storage",
"webRequest",
"http://*/*/*",
"https://*/*/*",
"webRequestBlocking",
"tabs"
],
"background": {
"scripts": ["background.js"],
"persistent": true
},
"browser_action": {
"default_popup": "popup.html"
},
"options_page": "options.html",
"manifest_version": 2
}
Thank You!