19

Certain google sites such as GMail, Google Voice, and others show a little blue dot when they update in the background (when the window doesn't have focus). This is definitely done through a JavaScript API. I've seen at least one other website (imo.im) do it as well.

How do you make this happen in JavaScript?

If you aren't entirely sure what I'm talking about, here is an image:

Navarr
  • 3,703
  • 7
  • 33
  • 57
  • 1
    not an answer, but might help n case you don't find a proper answer : http://stackoverflow.com/questions/37122/make-browser-window-blink-in-task-bari – yoda Jan 28 '11 at 07:13
  • Though its not what I'm looking for, I appreciate the attempt :) – Navarr Jan 28 '11 at 07:16
  • @Pacerier Yeah, I think I took that video down. If you want to see an example of it in action, simply pin this tab, open up the javascript console, go to a different tab (important step), and type `document.title = 'flash';` – Navarr Jun 27 '12 at 16:19

1 Answers1

21

Apparently tabs flash automatically when you change the title, this does not work for pinned tabs however.

EDIT

Oh wait, it does work for pinned tabs, but not apps.

Source

Olical
  • 39,703
  • 12
  • 54
  • 77
  • It actually works for both :3 (as long as the App is pinned, anyway) – Navarr Jan 30 '11 at 04:01
  • 1
    Oh nice. It isn't often that something works better than expected on the web :) – Olical Feb 02 '11 at 09:11
  • 2
    The source link no longer works. Which is why we prefer to see the source here, even if you link to the original. I'd appreciate a link because simply setting `document.title` doesn't flash the tab for me. – Bernhard Hofmann Aug 12 '13 at 08:34
  • 1
    I think the source link fails because Google groups is blocked by our corporate proxy. Oh the warm fuzzy protective feeling I have... where is it? – Bernhard Hofmann Aug 12 '13 at 08:47
  • @BernhardHofmann If it wasn't flashing it may have been in the foreground? You should get the little "flash" if it's in the background and the title changes. – Navarr Feb 17 '15 at 15:49
  • 2
    executing `window.document.title = 'change';` doesn't seem to trigger this on a pinned tab for me. Am I missing something? (Chrome v64) – Trevor Jan 31 '18 at 18:36