don't let notifications interfere with document titles

pull/1/head
ansuz 8 years ago
parent a9e2ca8d72
commit f29e3d7b0d

@ -33,7 +33,7 @@ define([
var notify = function () {
if (!(Visible.isSupported() && !Visible.currently())) { return; }
unnotify();
module.tabNotification = Notify.tab(document.title, 1000, 10);
module.tabNotification = Notify.tab(1000, 10);
};
var setEditable = function (bool) {

@ -503,7 +503,7 @@ define([
var notify = module.notify = function () {
if (Visible.isSupported() && !Visible.currently()) {
unnotify();
module.tabNotification = Notify.tab(document.title, 1000, 10);
module.tabNotification = Notify.tab(1000, 10);
}
};

@ -41,8 +41,7 @@
}
};
var tab = Module.tab = function (msg, frequency, count) {
var original = document.title;
var tab = Module.tab = function (frequency, count) {
var key = '_pendingTabNotification';
var favicon = document.getElementById('favicon');
@ -56,7 +55,6 @@
// only run one tab notification at a time
if (Module[key]) {
window.clearInterval(Module[key]);
document.title = original;
if (favicon) {
favicon.setAttribute('href', pending? alt : main);
}
@ -69,11 +67,9 @@
cancel();
var step = function () {
document.title = (document.title === original) ? msg : original;
if (favicon) {
favicon.setAttribute('href', favicon.getAttribute('href') === main? alt : main);
}
--count;
};
@ -86,8 +82,6 @@
return {
cancel: cancel,
original: original
};
};

@ -389,7 +389,7 @@ define([
var notify = function () {
if (Visible.isSupported() && !Visible.currently()) {
unnotify();
module.tabNotification = Notify.tab(document.title, 1000, 10);
module.tabNotification = Notify.tab(1000, 10);
}
};

@ -430,7 +430,7 @@ define([
var notify = function () {
if (!(Visible.isSupported() && !Visible.currently())) { return; }
unnotify();
module.tabNotification = Notify.tab(document.title, 1000, 10);
module.tabNotification = Notify.tab(1000, 10);
};
// don't make changes until the interface is ready
@ -725,6 +725,7 @@ define([
return;
}
document.title = title;
module.tabNotification.update(title);
var proxy = module.rt.proxy;
if (proxy.metadata) {
proxy.metadata.title = title;

@ -65,7 +65,7 @@ define([
var notify = function () {
if (!(Visible.isSupported() && !Visible.currently())) { return; }
unnotify();
APP.tabNofification = Notify.tab(document.title, 1000, 10);
APP.tabNofification = Notify.tab(1000, 10);
};
var $modal = $('#modal');

Loading…
Cancel
Save