I want to change the Icon of Chrome Extension automatically when specific criteria meet. I tried the following function:
chrome.browserAction.setIcon({path: 'image path'})
I'm achieving my functionality by clicking the icon button, when popup appears and icon changed dynamically, if that specific criteria meet.
The problem is, I want this functionality automatically, no need to click the Icon.
Actually I am new to chrome development, May be there is need to registered the method inside the 'manifest.json' file, which automatically triggered the function to change the icon and when our criteria meet than its change the icon.
Thanks in Advance. :)
I think the background pages can help you solve this problem. http://developer.chrome.com/extensions/background_pages.html It is a single long-running script to manage some task or state in background. You can use the setInterval to check the specific criteria. Hope this reference can help you!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With