|
|
@ -51,13 +51,13 @@
|
|
|
|
var alt = favicon.getAttribute('data-alt-favicon');
|
|
|
|
var alt = favicon.getAttribute('data-alt-favicon');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var cancel = function () {
|
|
|
|
var cancel = function (pending) {
|
|
|
|
// only run one tab notification at a time
|
|
|
|
// only run one tab notification at a time
|
|
|
|
if (Module[key]) {
|
|
|
|
if (Module[key]) {
|
|
|
|
window.clearInterval(Module[key]);
|
|
|
|
window.clearInterval(Module[key]);
|
|
|
|
document.title = original;
|
|
|
|
document.title = original;
|
|
|
|
if (favicon) {
|
|
|
|
if (favicon) {
|
|
|
|
favicon.setAttribute('href', main);
|
|
|
|
favicon.setAttribute('href', pending? alt : main);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
@ -78,13 +78,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
Module[key] = window.setInterval(function () {
|
|
|
|
Module[key] = window.setInterval(function () {
|
|
|
|
if (count > 0) { return step(); }
|
|
|
|
if (count > 0) { return step(); }
|
|
|
|
cancel();
|
|
|
|
cancel(true);
|
|
|
|
|
|
|
|
|
|
|
|
}, frequency);
|
|
|
|
}, frequency);
|
|
|
|
step();
|
|
|
|
step();
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
cancel: cancel,
|
|
|
|
cancel: cancel,
|
|
|
|
original: original
|
|
|
|
original: original
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|