views:

19

answers:

1

There is a feature in Chrome - you can right-click on a tab and select "Pin Tab", then tab is moved to the left corner and looks like an icon with text.

So there is the question: how can I highlight this tab? Maybe there is some API?

For example, gmail can highlight this tab when new mail message is come.

Thank you.

A: 

You can't blink the tab, just the tab title:

<script>
function blinkTitle() {
 if(!window.oldtitle) window.oldtitle = document.title;
 if(document.title == ' ') {
  document.title = window.oldtitle;
 } else {
  document.title = ' ';
 }
}
function startBlink() {
 window.blinkinterval = setInterval(blinkTitle,200);
}
onload = function() {
 document.onblur = function() {
  setTimeout(startBlink,2000);
 }
 document.onfocus = function() {
  clearInterval(window.blinkinterval);
  document.title = window.oldtitle;
 }
}
</script>
charles.art.br
tis not what I want. Just pin the tab with gmail in Chromium on Windows 7 and wait for a new mail - then you will see what I want :)
silent