如何在窗口10的任务栏中高亮显示/闪烁/最小化浏览器磁贴?

时间:2018-07-03 00:24:01

标签: javascript jquery html css jquery-ui

当我在应用程序中收到消息时,我想突出显示/闪烁/刷新浏览器。现在,我正在使用下面的代码在标题栏中闪烁文本。

newExcitingAlerts = (function () {
var oldTitle = document.title;
var msg = "You have a new message!";
var timeoutId;
var blink = function() { 
    document.title = document.title == msg ? ' ' : msg;
    $(".favicon").attr("href","/commonprov/web/images/webconsole/favicon-notify.ico");
 };
var clear = function() {
    clearInterval(timeoutId);
    document.title = oldTitle;
    window.onmousemove = null;
    timeoutId = null;
    $(".favicon").attr("href","/commonprov/web/images/webconsole/favicon.ico");
};
return function () {
    if (!timeoutId) {
        timeoutId = setInterval(blink, 1000);
        window.onmousemove = clear;
    }
};
}());

但是,如果在Window 10中将其最小化,我也希望任务栏中有Flash浏览器磁贴。

0 个答案:

没有答案