summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorwn <4-wn@users.noreply.gitlab.tt-rss.org>2025-07-08 10:41:13 -0500
committerwn <4-wn@users.noreply.gitlab.tt-rss.org>2025-07-08 10:41:13 -0500
commitd3599707ac8ab4327b15805375628a8238583b73 (patch)
tree17ac6d76e1bd92151c0126e2f2935c11ae5b4205 /js
parentda4b886f085fdc77c5e6d4c2543578f7b1c2041a (diff)
parent5b99ccf66279cbf7396d88385851fa592307c7ba (diff)
Merge branch 'feature/article-display-url-skip-request' into 'master'
Use existing headline info for 'Article.displayUrl()' See merge request tt-rss/tt-rss!164
Diffstat (limited to 'js')
-rw-r--r--js/Article.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/js/Article.js b/js/Article.js
index 694c7e616..a57454dec 100644
--- a/js/Article.js
+++ b/js/Article.js
@@ -123,15 +123,12 @@ const Article = {
Article.setActive(0);
},
displayUrl: function (id) {
- const query = {op: "Article", method: "getmetadatabyid", id: id};
+ const hl = Headlines.objectById(id);
- xhr.json("backend.php", query, (reply) => {
- if (reply && reply.link) {
- prompt(__("Article URL:"), reply.link);
- } else {
- alert(__("No URL could be displayed for this article."));
- }
- });
+ if (hl?.link)
+ prompt(__("Article URL:"), hl.link);
+ else
+ alert(__("No URL could be displayed for this article."));
},
openInNewWindow: function (id) {
/* global __csrf_token */