Explorar o código

Dynamic favicon all unread articles

https://github.com/marienfressinaud/FreshRSS/issues/539
Alexandre Alapetite %!s(int64=11) %!d(string=hai) anos
pai
achega
6972a46979
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      p/scripts/main.js

+ 4 - 1
p/scripts/main.js

@@ -1060,7 +1060,10 @@ function init_password_observers() {
 
 function faviconNbUnread(n) {
 	if (typeof n === 'undefined') {
-		n = str2int($('.category.all>a').attr('data-unread'));
+		n = 0;
+		$('.feed[data-unread]').each(function() {
+			n += str2int(this.getAttribute('data-unread'));
+		});
 	}
 	//http://remysharp.com/2010/08/24/dynamic-favicons/
 	var canvas = document.createElement('canvas'),