summaryrefslogtreecommitdiff
path: root/p/scripts
diff options
context:
space:
mode:
authorGravatar Alexis Degrugillier <github@ainw.org> 2014-02-16 13:22:43 -0500
committerGravatar Alexis Degrugillier <github@ainw.org> 2014-02-16 13:22:43 -0500
commit166f3a20c7ae42d930c060371529f262bcbd2ebb (patch)
tree577e7048de8af0812bfe65d9c8ad4a7ca4746fdf /p/scripts
parent7ed7722c274e38c97511481fdd68138e463cfbc4 (diff)
Change syntax to have less tests
Diffstat (limited to 'p/scripts')
-rw-r--r--p/scripts/main.js10
1 files changed, 2 insertions, 8 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js
index bd8eb0b2b..34042c945 100644
--- a/p/scripts/main.js
+++ b/p/scripts/main.js
@@ -286,10 +286,7 @@ function next_entry() {
function prev_feed() {
var active_feed = $("#aside_flux .feeds li.active");
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 {
last_feed();
}
@@ -298,10 +295,7 @@ function prev_feed() {
function next_feed() {
var active_feed = $("#aside_flux .feeds li.active");
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 {
first_feed();
}