gpt4 book ai didi

javascript - 如何让 Chrome 扩展程序的窗口在任务栏中闪烁?

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:16:49 24 4
gpt4 key购买 nike

我注意到有些应用程序可以使用 chrome 扩展程序使任务栏中的窗口闪烁?类似于 chrome 在下载东西时会显示绿色进度条,其他窗口会闪烁橙色以引起您的注意。有没有办法获得 chrome 扩展程序来执行此操作?

最佳答案

是的,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});

关于javascript - 如何让 Chrome 扩展程序的窗口在任务栏中闪烁?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27520255/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com