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
This commit is contained in:
wn 2025-07-08 10:41:13 -05:00
commit d3599707ac

View File

@ -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 {
if (hl?.link)
prompt(__("Article URL:"), hl.link);
else
alert(__("No URL could be displayed for this article."));
}
});
},
openInNewWindow: function (id) {
/* global __csrf_token */