Groups
Groups
Sign in
Groups
Groups
Chromium Extensions
Conversations
About
Send feedback
Help
MV3: chrome.action.onClicked.addListener not working?
9,174 views
Skip to first unread message
Sonny Chee
unread,
Mar 23, 2022, 2:14:00 PM
3/23/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chromium Extensions
Hey Guys,
So in MV2, this used to work:
chrome.browserAction.onClicked.addListener(function(tab) {
window.open( "
https://www.no-password.com
", "_blank" );
})
I've revised to:
chrome.action.OnClicked.addListener( ....
No error message or warnings in the console when I click the extension icon. I found a 2019 conversation (
https://groups.google.com/a/chromium.org/g/chromium-extensions/c/9WqUFsURnsc
) that this was not working but nothing since....
Any suggested workaround would be greatly appreciated.
Stefan vd
unread,
Mar 23, 2022, 2:45:33 PM
3/23/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chromium Extensions, sonny...@gmail.com
Hi Sonny,
That works just fine here in my Chrome version 99.0.4844.83.
Chrome extension manifest v3 with this as
background.js
code:
chrome.action.onClicked.addListener((tab) => {
chrome.tabs.create({url: "
https://www.youtube.com
"});
});
Thanks,
Stefan vd
Sonny Chee
unread,
Mar 23, 2022, 4:26:32 PM
3/23/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chromium Extensions, Stefan vd, Sonny Chee
Thanks Stefan, that worked like a charm.
Stefan vd
unread,
Mar 23, 2022, 4:31:56 PM
3/23/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chromium Extensions, sonny...@gmail.com, Stefan vd
Hi Sonny,
You are welcome!
Thanks,
Stefan vd
Reply all
Reply to author
Forward
0 new messages