4

On google chrome, when an alert() is activated and chrome is minimized there is an instance that the chrome icon on the taskbar glows orange (windows 7) sometimes the whole browser maximizes.

Is it possible to activate that glowing feature with javascript?

I need this for our office. I want the chrome icon to glow when its minimized and the user received a new message.

Thanks!

Jo E.
  • 7,822
  • 14
  • 58
  • 94
  • 1
    how about using http://www.html5rocks.com/en/tutorials/notifications/quick/. This question may be similar to http://stackoverflow.com/questions/37122/make-browser-window-blink-in-task-bar – HariKrishnan Aug 09 '13 at 06:46

2 Answers2

0

I found this piece of code, can't test is right now because i'm not using windows, but you should give it a try.

<script type="text/javascript">
    // Flashing TaskBar
    setInterval(flashToolbar, 10000);    // calls flashToolbar every 10000 ms

    function flashToolbar() {
        if (window.external.msIsSiteMode()) {
            window.external.msSiteModeActivate();
        }
    }
</script>

source: http://blogs.msdn.com/b/jennifer/archive/2011/05/10/ie-pinned-sites-part-8-how-to-implement-a-flashing-taskbar-button.aspx

wardva
  • 624
  • 9
  • 28
  • not working on chrome. I made a quick search and I think its IE only? The office browsers are all chrome so I kinda need it to be chrome compatible. Thanks though. . – Jo E. Aug 09 '13 at 07:01
0

What I needed was a tactic that can get the users attention when they receive a new message while the browser is minimized. I couldn't find a way for the icon on the task bar to blink but I found an alternative that still fills the need. @HariKrishnan gave a link that led to a couple of googling that made me discover Web Notifications. You can find a very simple tutorial here.

Cheers!


For future reference I added the tut here since its just a two step process . .

Step 1

Ask user to allow webkitNotifications (Same thing with the html5 geolocation)

function askPermission(){
    webkitNotifications.requestPermission(testNotification);
}

Step 2

Creating a notification

function testNotification(){    
    var notification = webkitNotifications.createNotification('IMAGE','TITLE','BODY');
    notification.show();
}

(Note: Multiple notifications will stack)

Jo E.
  • 7,822
  • 14
  • 58
  • 94