Ver Fonte

Change syntax to have less tests

Alexis Degrugillier há 12 anos atrás
pai
commit
166f3a20c7
1 ficheiros alterados com 2 adições e 8 exclusões
  1. 2 8
      p/scripts/main.js

+ 2 - 8
p/scripts/main.js

@@ -286,10 +286,7 @@ function next_entry() {
 function prev_feed() {
 function prev_feed() {
 	var active_feed = $("#aside_flux .feeds li.active");
 	var active_feed = $("#aside_flux .feeds li.active");
 	if (active_feed.length > 0) {
 	if (active_feed.length > 0) {
-		var prev_feed = active_feed.prev().find('a.feed');
-		if (prev_feed.length > 0) {
-			prev_feed[0].click();
-		}
+		active_feed.prev().find('a.feed').each(function(){this.click();});
 	} else {
 	} else {
 		last_feed();
 		last_feed();
 	}
 	}
@@ -298,10 +295,7 @@ function prev_feed() {
 function next_feed() {
 function next_feed() {
 	var active_feed = $("#aside_flux .feeds li.active");
 	var active_feed = $("#aside_flux .feeds li.active");
 	if (active_feed.length > 0) {
 	if (active_feed.length > 0) {
-		var next_feed = active_feed.next().find('a.feed');
-		if (next_feed.length > 0) {
-			next_feed[0].click();
-		}
+		active_feed.next().find('a.feed').each(function(){this.click();});
 	} else {
 	} else {
 		first_feed();
 		first_feed();
 	}
 	}