1

Is there a way to modify the outlook of a specific tab dynamically with Javascript from an extension? Change font, color, etc. Not the website the tab is showing, but the tab itself.

The outcome should be such that, for example out of 10 open tabs, the current tab's title font color is blue. Tab font color at index 3, and 7 are also blue. Other tabs look normal. Each tab color can be toggled on and off separately without affecting the other tabs.

hannu40k
  • 512
  • 1
  • 8
  • 20
  • https://developer.chrome.com/extensions/themes.html – Rob W Nov 06 '13 at 15:27
  • "Themes are packaged like regular extensions, but they don't contain JavaScript". I need to use Javascript. Or do you mean to say that I can mix themes and JS as I please? – hannu40k Nov 06 '13 at 15:37
  • It is the only way to change the appearance of Chromium. You cannot use JavaScript to change the layout (actually, there is one method: http://stackoverflow.com/a/10030440/938089) – Rob W Nov 06 '13 at 15:39
  • So the answer is "it is currently not possible", since a theme can't apparently be applied to only a single tab. – hannu40k Nov 06 '13 at 15:51
  • It is not straightforward, but certainly *possible* (albeit not very convenient to set up). See the linked answer in my previous comment for an explanation of the method). – Rob W Nov 06 '13 at 15:52
  • The way I understood the link, it is only possible to apply a theme to the whole browser when you select a specific tab for example. I need the different tabs to hold their unique appearance even when another tab is active. Is this not correct? – hannu40k Nov 06 '13 at 15:57
  • The other answer suggested to detect tab changes, and switch the theme based on your preferences. – Rob W Nov 06 '13 at 15:58
  • I tried to clarify my objective in the original question. – hannu40k Nov 06 '13 at 16:18
  • 1
    You cannot change the tab's colors in this way. If you need a visual indicator, change the document's titles using [content scripts](https://developer.chrome.com/extensions/content_scripts.html). – Rob W Nov 06 '13 at 16:21

0 Answers0