aboutsummaryrefslogtreecommitdiffhomepage
path: root/ui/static/js/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/static/js/app.js')
-rw-r--r--ui/static/js/app.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/ui/static/js/app.js b/ui/static/js/app.js
index 2b32e63..968045e 100644
--- a/ui/static/js/app.js
+++ b/ui/static/js/app.js
@@ -304,6 +304,25 @@ function openOriginalLink(openLinkInCurrentTab) {
}
}
+function openCommentLink(openLinkInCurrentTab) {
+ if (!isListView()) {
+ let entryLink = document.querySelector("a[data-comments-link]");
+ if (entryLink !== null) {
+ if (openLinkInCurrentTab) {
+ window.location.href = entryLink.getAttribute("href");
+ } else {
+ DomHelper.openNewTab(entryLink.getAttribute("href"));
+ }
+ return;
+ }
+ } else {
+ let currentItemCommentsLink = document.querySelector(".current-item a[data-comments-link]");
+ if (currentItemCommentsLink !== null) {
+ DomHelper.openNewTab(currentItemCommentsLink.getAttribute("href"));
+ }
+ }
+}
+
function openSelectedItem() {
let currentItemLink = document.querySelector(".current-item .item-title a");
if (currentItemLink !== null) {