简体   繁体   中英

Is there a way to shade/color/highlight a tab on Chrome with an extension?

For my Chrome extension (a productivity tool) I want to highlight the tabs that are distracting for the users. For instance, after 10 minutes of Facebook usage, it would alert that you are getting distracted by too much of social activity. My background script is already collecting this data and I want to display this on the front end somehow.

I'm currently doing this with a browser action (with a button near the omnibar). Is there a way to implement a change of color on the top of the tab just to alert the user in a subtle way?

To the best of my knowledge, Chrome doesn't support setting the background color or foreground text color for tabs in Chrome programatically nor through the extension APIs. Your best option here may be trying to highlight the tab by means of the tab icon, which can be controlled.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM