Fixed syntax
This commit is contained in:
parent
41ff65fb01
commit
f220ce0541
@ -3393,35 +3393,34 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
var titleBackup = document.title,
|
var titleBackup = document.title,
|
||||||
titlePromise;
|
titlePromise;
|
||||||
|
|
||||||
$rootScope.$watch('idle.isIDLE', function (newVal) {
|
$rootScope.$watch('idle.isIDLE', function (newVal) {
|
||||||
|
if (!newVal) {
|
||||||
|
notificationsClear();
|
||||||
|
}
|
||||||
|
if (!Config.Navigator.mobile) {
|
||||||
|
$interval.cancel(titlePromise);
|
||||||
if (!newVal) {
|
if (!newVal) {
|
||||||
notificationsClear();
|
document.title = titleBackup;
|
||||||
}
|
$('link[rel="icon"]:first').replaceWith(faviconBackupEl);
|
||||||
if (!Config.Navigator.mobile) {
|
} else {
|
||||||
$interval.cancel(titlePromise);
|
titleBackup = document.title;
|
||||||
if (!newVal) {
|
|
||||||
document.title = titleBackup;
|
|
||||||
$('link[rel="icon"]:first').replaceWith(faviconBackupEl);
|
|
||||||
} else {
|
|
||||||
titleBackup = document.title;
|
|
||||||
|
|
||||||
titlePromise = $interval(function () {
|
titlePromise = $interval(function () {
|
||||||
var time = tsNow();
|
var time = tsNow();
|
||||||
if (!notificationsCount || time % 2000 > 1000) {
|
if (!notificationsCount || time % 2000 > 1000) {
|
||||||
document.title = titleBackup;
|
document.title = titleBackup;
|
||||||
var curFav = $('link[rel="icon"]:first');
|
var curFav = $('link[rel="icon"]:first');
|
||||||
if (curFav.attr('href').indexOf('favicon_unread') != -1) {
|
if (curFav.attr('href').indexOf('favicon_unread') != -1) {
|
||||||
curFav.replaceWith(faviconBackupEl);
|
curFav.replaceWith(faviconBackupEl);
|
||||||
}
|
|
||||||
} else {
|
|
||||||
document.title = langNotificationsPluralize(notificationsCount);
|
|
||||||
$('link[rel="icon"]:first').replaceWith(faviconNewEl);
|
|
||||||
}
|
}
|
||||||
}, 1000);
|
} else {
|
||||||
}
|
document.title = langNotificationsPluralize(notificationsCount);
|
||||||
|
$('link[rel="icon"]:first').replaceWith(faviconNewEl);
|
||||||
|
}
|
||||||
|
}, 1000);
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
$rootScope.$on('apiUpdate', function (e, update) {
|
$rootScope.$on('apiUpdate', function (e, update) {
|
||||||
// console.log('on apiUpdate', update);
|
// console.log('on apiUpdate', update);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user