Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make a Chrome extension's window blink in the taskbar?

I've noticed there are some applications that can make the window in the taskbar blink using a chrome extension? Similar to how chrome will show a green progress bar when downloading something, other windows will blink orange to get your attention. Is there anyway to get a chrome extension to do this?

like image 417
Sean Avatar asked Oct 31 '22 12:10

Sean


1 Answers

Yes, it's possible with the windows API:

drawAttention

If true, causes the window to be displayed in a manner that draws the user's attention to the window, without changing the focused window. The effect lasts until the user changes focus to the window. This option has no effect if the window already has focus. Set to false to cancel a previous draw attention request.

// You can pass -2 as windowId for the current window,
//  or query tabs/windows to get the one you want
chrome.windows.update(windowId, {drawAttention: true});
like image 99
Xan Avatar answered Nov 15 '22 04:11

Xan