Dynamic favicon: remove the same number in the title

Now the number of unread articles in only shown in the favicon
https://github.com/marienfressinaud/FreshRSS/issues/539
This commit is contained in:
Alexandre Alapetite
2014-08-09 22:00:20 +02:00
parent d477373ef2
commit b68c5c6630
2 changed files with 4 additions and 7 deletions

View File

@@ -69,9 +69,6 @@ class FreshRSS_index_Controller extends Minz_ActionController {
// mise à jour des titres
$this->view->rss_title = $this->view->currentName . ' | ' . Minz_View::title();
if ($this->view->nb_not_read > 0) {
Minz_View::prependTitle('(' . formatNumber($this->view->nb_not_read) . ') ');
}
Minz_View::prependTitle(
($this->nb_not_read_cat > 0 ? '(' . formatNumber($this->nb_not_read_cat) . ') ' : '') .
$this->view->currentName .

View File

@@ -106,16 +106,16 @@ function incUnreadsFeed(article, feed_id, nb) {
var isCurrentView = false;
//Update unread: title
document.title = document.title.replace(/^((?:\([ 0-9]+\) )?)(.*? · )((?:\([ 0-9]+\) )?)/, function (m, p1, p2, p3) {
document.title = document.title.replace(/^((?:\([ 0-9]+\) )?)/, function (m, p1) {
var $feed = $('#' + feed_id);
if (article || ($feed.closest('.active').length > 0 && $feed.siblings('.active').length === 0)) {
isCurrentView = true;
return incLabel(p1, nb, true) + p2 + incLabel(p3, feed_priority > 0 ? nb : 0, true);
return incLabel(p1, nb, true);
} else if ($('.all.active').length > 0) {
isCurrentView = feed_priority > 0;
return incLabel(p1, feed_priority > 0 ? nb : 0, true) + p2 + incLabel(p3, feed_priority > 0 ? nb : 0, true);
return incLabel(p1, feed_priority > 0 ? nb : 0, true);
} else {
return p1 + p2 + incLabel(p3, feed_priority > 0 ? nb : 0, true);
return p1;
}
});
return isCurrentView;