aboutsummaryrefslogtreecommitdiff
path: root/ui/static/js/nav_handler.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/static/js/nav_handler.js')
-rw-r--r--ui/static/js/nav_handler.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/ui/static/js/nav_handler.js b/ui/static/js/nav_handler.js
index 5f611e0a..dd106074 100644
--- a/ui/static/js/nav_handler.js
+++ b/ui/static/js/nav_handler.js
@@ -173,6 +173,17 @@ class NavHandler {
}
}
+ goToFeedOrFeeds() {
+ if (this.isEntry()) {
+ let feedAnchor = document.querySelector("span.entry-website a");
+ if (feedAnchor !== null) {
+ window.location.href = feedAnchor.href;
+ }
+ } else {
+ this.goToPage('feeds');
+ }
+ }
+
goToPreviousListItem() {
let items = DomHelper.getVisibleElements(".items .item");
if (items.length === 0) {
@@ -228,6 +239,10 @@ class NavHandler {
}
}
+ isEntry() {
+ return document.querySelector("section.entry") !== null;
+ }
+
isListView() {
return document.querySelector(".items") !== null;
}