I'm developing a chrome extension that lists offers while visiting some shopping websites. For example, when a user visits flipkart.com, extension popup would show up automatically without having to click on the extension icon. I've managed to do all other aspects of the extension except automatically opening the popup while user visits a website.
Things that I've tried and failed so far are listed below,
- Looked for chrome action API method to manually trigger the click event
- Use chrome.commands that works based on keyboard shortcuts
I have read some answers for questions nearly matching. Unfortunately, some accepted answers say that this requirement is not allowed due to security reasons. But, I've seen it's working in a chrome extension namely Honey. That made me feel like there must be some work around to achieve the same.
Manifest file is copied below;
{
"name": "SaveMore",
"description": "Know the best offers available",
"version": "1.0",
"manifest_version": 3,
"background": {
"service_worker": "background.js"
},
"permissions": ["storage", "tabs"],
"action": {
"default_popup": "popup.html",
"default_icon": {
"16": "/images/logo16.png",
"32": "/images/logo32.png",
"48": "/images/logo48.png",
"128": "/images/logo128.png"
}
},
"icons": {
"16": "/images/logo16.png",
"32": "/images/logo32.png",
"48": "/images/logo48.png",
"128": "/images/logo128.png"
},
"content_scripts": [
{
"matches": ["<all_urls>"],
"js": ["app.js"],
"run_at": "document_end"
}
],
"content_security_policy": {},
"commands": {
"_execute_browser_action": {
"suggested_key": {
"default": "Ctrl+Shift+Y"
}
}
}
}
Any help would become a life saver
Thanks